config-joker
A package to ease usage of different configuration conditions in your projects.
How to use in
Obs.: There are some examples in the examples folder
Import the sources you'll use and the Config class:
from config_joker Config, EnvironmentSource
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)
The value stored in number_one_from_env_source_as_int will be the number one as an integer.
Metadata
Release files for config-joker 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| config_joker-0.7.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| config_joker-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / config_joker-0.7.0.tar.gz
| Download URL | config_joker-0.7.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41bb715630703da6333486fa77eab5019f0a1f2400b5c5b44514d164b9149148
|
|
BLAKE2b-256 checksum How to use checksums |
ccbb8ca4218e01b400c2b43c6833d09bc773775b3c1c433f618f571499852e69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1039-azure
|
Release files / config_joker-0.7.0-py3-none-any.whl
| Download URL | config_joker-0.7.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3691c255520107992b5c4563a3889364033c5509616f63a0e5a072f37d039cd3
|
|
BLAKE2b-256 checksum How to use checksums |
5acfa61b563b26b2f7b3ba8b69d8cec42940a9fb71b14e6124e4a2b7c2cbb48e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1039-azure
|