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)
Release files for config-joker 0.1.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.1.0.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| config_joker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / config_joker-0.1.0.tar.gz
| Download URL | config_joker-0.1.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38cab8efda11cf728c41791ba9c4c5fe16d37c7e97a2671b7556e86daa488a10
|
|
BLAKE2b-256 checksum How to use checksums |
948db77ad1e83f707e6f18b7b118af7ebe207812304d4a297db3f0ffd9387726
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Linux/5.19.0-38-generic
|
Release files / config_joker-0.1.0-py3-none-any.whl
| Download URL | config_joker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a30382a79d115018f30a236a74e5d62124a644dc74b669606b150e1e4a1106eb
|
|
BLAKE2b-256 checksum How to use checksums |
180b4cdaaa2257da9bb15919c663cda88ced5c6e4ee8bd95736b58cf08129b5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Linux/5.19.0-38-generic
|