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.1.tar.gz (4.6 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.1-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for takumi_config-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b86e5eea5e3c33667239c053550c483081cb9147b1287a91d85354eeee1f820c
MD5 1f9cc548a79c952504f1f3a39382c803
BLAKE2b-256 53de4f3085e57a466a060c425f127c9eea7ba89a8cc67aae7fb2b4ead9240847

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for takumi_config-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a17775b9181cb6d043e19049456218468da43382ec34eaa2689573f4562271b8
MD5 5d5150d8713906a38b1c2720dfee8f1b
BLAKE2b-256 9aa041014f8d158298a4bae42824689c717081ea8c380b59afb18a1732901172

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page