Load the configuration from the Flask configuration.
770590
def _load_config(self):
        
        options = dict()

        job_stores = self.app.config.get('SCHEDULER_JOBSTORES')
        if job_stores:
            options['jobstores'] = job_stores

        executors = self.app.config.get('SCHEDULER_EXECUTORS')
        if executors:
            options['executors'] = executors

        job_defaults = self.app.config.get('SCHEDULER_JOB_DEFAULTS')
        if job_defaults:
            options['job_defaults'] = job_defaults

        timezone = self.app.config.get('SCHEDULER_TIMEZONE')
        if timezone:
            options['timezone'] = timezone

        self._scheduler.configure(**options)

        self.auth = self.app.config.get('SCHEDULER_AUTH', self.auth)
        self.api_enabled = self.app.config.get('SCHEDULER_VIEWS_ENABLED', self.api_enabled)  # for compatibility reason
        self.api_enabled = self.app.config.get('SCHEDULER_API_ENABLED', self.api_enabled)
        self.api_prefix = self.app.config.get('SCHEDULER_API_PREFIX', self.api_prefix)
        self.endpoint_prefix = self.app.config.get('SCHEDULER_ENDPOINT_PREFIX', self.endpoint_prefix)
        self.allowed_hosts = self.app.config.get('SCHEDULER_ALLOWED_HOSTS', self.allowed_hosts)
1049957
def load_config_from_file(app, filepath):
    """"""
    try:
        app.config.from_pyfile(filepath)
        return True
    except IOError:
        # TODO: Can we print to sys.stderr in production? Should this go to
        # logs instead?
        print("Did not find settings file %s for additional settings, skipping it" % filepath, file=sys.stderr)
        return False
45837
def load_from_dict(self, conf_dict=None):
        
        self.set_to_default()
        self._update_dict(self._config, conf_dict)
        self._update_python_paths()
147797
def load(self):
        

        # Must reverse because we want the sources assigned to higher-up Config instances
        # to overrides sources assigned to lower Config instances.
        for section in reversed(list(self.iter_sections(recursive=True, key=None))):
            if section.is_config:
                section.load()

        for source in self.settings.load_sources:
            adapter = getattr(self, _get_persistence_adapter_for(source))
            if adapter.store_exists(source):
                adapter.load(source)
422763
def load_config(self):
        """"""
        config = Config()
        self.config_obj = config.load('awsshellrc')
        self.config_section = self.config_obj['aws-shell']
        self.model_completer.match_fuzzy = self.config_section.as_bool(
            'match_fuzzy')
        self.enable_vi_bindings = self.config_section.as_bool(
            'enable_vi_bindings')
        self.show_completion_columns = self.config_section.as_bool(
            'show_completion_columns')
        self.show_help = self.config_section.as_bool('show_help')
        self.theme = self.config_section['theme']
955459
def config_loader(app, **kwargs):
    """"""
    app.config.from_object(Config)
    app.config.update(**kwargs)
602116
public function loadConfiguration(): void
	{
		$config = $this->validateConfig($this->defaults);
		$builder = $this->getContainerBuilder();

		Validators::assertField($config, 'siteKey', 'string');
		Validators::assertField($config, 'secretKey', 'string');

		$builder->addDefinition($this->prefix('provider'))
			->setFactory(ReCaptchaProvider::class, [$config['siteKey'], $config['secretKey']]);
	}
290676
def _load_from_configs(self, filename):
    
    config_filename = os.path.join(self._config_path, filename)
    if os.path.exists(config_filename):
      try:
        f = open(config_filename, 'r')
        content = ''.join(f.readlines())
        f.close()
        return content
      except Exception as err:
        raise err
    else:
      raise IOError("File not found: {}".format(config_filename))
1013648
private final function loadConfig(): void
    {
        $this->config = new Config();

        $file = sprintf('%s/app/service/%s/config/config.php', APP_DIR, $this->name);
        if (file_exists($file) && is_array($data = include $file)) {
            $this->config->setData($data);
        }
    }
1293465
def load():
    
    config = ConfigParser.RawConfigParser(DEFAULTS)
    config.readfp(open(CONF_PATH))
    for section in config.sections():
        globals()[section] = {}
        for key, val in config.items(section):
            globals()[section][key] = val
1259136
def load_configuration(self):
        """"""
        filename = os.path.join(os.path.dirname(__file__), 'templates/spline-loc.yml.j2')
        with open(filename) as handle:
            return Adapter(safe_load(handle)).configuration
757928
def _load_config_file(self):
        
        LOGGER.info('Loading configuration from %s', self._file_path)
        if self._file_path.endswith('json'):
            config = self._load_json_config()
        else:
            config = self._load_yaml_config()
        for key, value in [(k, v) for k, v in config.items()]:
            if key.title() != key:
                config[key.title()] = value
                del config[key]
        return flatdict.FlatDict(config)
315249
def __load_configuration(self):
        
        handler_to_enable = filter(lambda h: h.keys is not None, handlers)
        for handler in handler_to_enable:
            if handler.name in self.kwargs:
                for k in handler.keys:
                    self.kwargs.update({k: True})

        self.config = self.configuration_class(self.app.config, **self.kwargs)
767983
protected function load_config() {
        if (!isset($this->config)) {
            $name = $this->get_name();
            $this->config = get_config("enrol_$name");
        }
    }
1197673
def load_from_config(self, config):
        """"""
        self.site = config.get("id", False)
        self.uri_base = config.get("uri_base", False)
        self.uris_to_crawl = self.crawlpage.get_uris(
            base_uri=self.uri_base,
            filter_list=config.get("crawl_uri_filters", None)
        )
        self.is_consume_page = self.crawlpage.has_selector(
            config.get("consume_selector", False)
        )
609737
def load(self, config):
        """"""
        self.config = config
        
        if 'start' not in self.config:
            raise ParseError('missing start entry')
        if 'states' not in self.config:
            raise ParseError('missing states entry')
        if 'transitions' not in self.config:
            raise ParseError('missing transitions entry')

        for state, val in self.config['states'].iteritems():
            state = State(state)
            state.entering = Action.load(val.get('entering'))
            state.leaving = Action.load(val.get('leaving'))
            
            self.states.add(state)
            
        self.start = self.states[self.config['start']]
        
        for transition, val in self.config['transitions'].iteritems():
            if '->' in transition:
                # from->to
                lft, rgt = transition.split('->')
                if lft == '*':
                    sfroms = self.states.keys()
                else:
                    sfroms = lft.split(',')
                if rgt == '*':
                    stos = self.states.keys()
                else:
                    stos = rgt.split(',')
                pairs = ((f, t) for f in sfroms for t in stos)
            else:
                # self transition 'from1,from2' = from1->from1, from2->from2
                if transition == '*':
                    ss = self.states.keys()
                else:
                    ss = transition.split(',')
                pairs = ((x, x) for x in ss)
                
            for sfrom, sto in pairs:
                if sfrom not in self.states:
                    raise ParseError("Could find state %r" % sfrom)
                if sto not in self.states:
                    raise ParseError("Could find state %r" % sto)

                s_from = self.states[sfrom]
                s_to = self.states[sto]
                
                if not isinstance(val, list):
                    val = [val]
                for v in val:
                    when = v['when']
                    actions = Action.load(v.get('actions'))
                    transition = Transition(s_from, s_to, Condition(when), actions)
                    s_from.transitions.append(transition)
991185
def _load_config(self, path):
        
        p = os.path.abspath(os.path.expanduser(path))
        logger.debug('Loading configuration from: %s', p)
        return read_json_file(p)