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

Takumi framework configuration manager. All configs are yaml files. There two different kinds of configs.

  • Env configs are independent to applications. Default path /etc/takumi/env.yaml. All fields are optional by default.

  • Application related configs. Default path $APP_ROOT/app.yaml. Required fields: app_name.

All configs can be accessed through the object config from takumit_config module. Env configs are stored in config.env.

Usage

For the given config files:

# /etc/takumi/env.yaml
env: prod

# app.yaml
name: echo
app: echo:service
settings: settings

# settings.py
DB_DSN = 'psycopg2+postgresql://root:123@localhost:5432/dev'
>>> from takumi_config import config
>>> print(config.env.name)
'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.0.tar.gz (4.1 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.0-py2.py3-none-any.whl (7.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for takumi_config-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5fc3c0ddf3070768e03d49a31bba2a093a27d6b36751e8c031d80f46ab3222a3
MD5 a5235ec7ee0a5c2c7ff006aa01254304
BLAKE2b-256 d2a3126ea07bb41985e0bf02173bb437ef183a1805db904aa998c5fe554d576e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for takumi_config-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b7689e45bce0e5be8d879ea15ad04387fccd7a4edda87dcc4abe8fa839a51038
MD5 8bb53e21439d67519a476e366315e9cd
BLAKE2b-256 cc97869b5b0e3d1706bce0d00c80204979f919460311acff6a65deec53677406

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 Sentry Error logging StatusPage Status page