A package to ease usage of different configuration conditions in your projects.
Project description
config-joker
A package to ease usage of different configuration conditions in your projects.
How to use in
Import the sources you'll use and the Config class:
from config_joker.sources.environment import EnvironmentSource
from config_joker.config import Config
Initialize the config class implementing the sources you want to use:
config = Config(
sources=[
EnvironmentSource(})
]
)
Find the configurations you want to use:
import os
os.environ['env_variable'] = '1'
number_one_from_env_source_as_int = config.required(key='env_variable', value_type=int)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
config_joker-0.1.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for config_joker-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a30382a79d115018f30a236a74e5d62124a644dc74b669606b150e1e4a1106eb |
|
MD5 | 75357fc6294eb6a9a0d30f7bbbc5a64c |
|
BLAKE2b-256 | 180b4cdaaa2257da9bb15919c663cda88ced5c6e4ee8bd95736b58cf08129b5b |