Skip to main content

The Folklore service framework configuration module

Project description

The Folklore framework configuration manager.

Configs are in yaml format stored in app.yaml by default. An environment vairable FOLKLORE_APP_CONFIG_PATH can be used to change the path of the yaml file.

To set current running environment of the app use environment vairable FOLKLORE_ENV. The default env is dev.


For the given config files:

# app.yaml
app_name: echo
app: echo:service
settings: settings
DB_DSN = 'psycopg2+postgresql://root:123@localhost:5432/dev'
>>> # With this environment vairable set:
>>> # FOLKLORE_ENV=prod
>>> from folklore_config import config
>>> print(config.env)
>>> print(config.app_name)
>>> config.settings.update({'TEST': True, 'HELLO': 'world'})
>>> print(config.settings['TEST'])
>>> print(config.settings['DB_DSN'])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

folklore_config-0.2.0-py2.py3-none-any.whl (5.6 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page