Configurator

class moxie.core.configurator.Configurator(app)

Provides basic configuration within Moxie. Currently we handle our configuration through YAML files.

from_envvar(envvar, silent=False)

Lifted from Flask.config

from_yaml(yaml_path, silent=False)

Read in the file and parse (safely) as YAML. Update the Flask conf, blueprints, services.

register_blueprints(blueprints)

Expects a dictionary of blueprints, something like this:

{'courses': {
    'url_prefix': '/courses',
    'factory': 'moxie_courses.create_blueprint'},
}

Here the factory should point to a callable which reflects the following function signature.

create_blueprint(name, conf) → Flask.blueprint