Skip to main content
https://travis-ci.org/elemepi/takumi-config.svg?branch=master

Takumi framework configuration manager.

Configs are in yaml format stored in app.yaml by default. An environment vairable TAKUMI_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 TAKUMI_ENV. The default env is dev.

Usage

For the given config files:

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

Download files

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

Source Distribution

takumi_config-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

takumi_config-0.1.2-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file takumi_config-0.1.2.tar.gz.

File metadata

  • Download URL: takumi_config-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for takumi_config-0.1.2.tar.gz
Algorithm Hash digest
SHA256 44f3c3946008114a7fca6d476de071814ed4b48bf40ec826f3e8977e661edb25
MD5 27a0a798e0926cc4ce2acc73e8c65383
BLAKE2b-256 ca2b002251562bb70b080201e736681bdf13e10cd858e032f09da24de9d05a47

See more details on using hashes here.

File details

Details for the file takumi_config-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for takumi_config-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2236943c0a7577f17f2d05c2a019bc0c3edffa5ab85106712de7000e505d3dcb
MD5 9408029b7b08e55c10b0001b280787e5
BLAKE2b-256 df1ac95e76786782b78b7cb242df2fb75692bb243f0d2221b19af59ce296e883

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page