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
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file config_joker-0.7.0.tar.gz.
File metadata
- Download URL: config_joker-0.7.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1039-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41bb715630703da6333486fa77eab5019f0a1f2400b5c5b44514d164b9149148
|
|
| MD5 |
7447903e585cde5c482a7f8004ad761e
|
|
| BLAKE2b-256 |
ccbb8ca4218e01b400c2b43c6833d09bc773775b3c1c433f618f571499852e69
|
File details
Details for the file config_joker-0.7.0-py3-none-any.whl.
File metadata
- Download URL: config_joker-0.7.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.15.0-1039-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3691c255520107992b5c4563a3889364033c5509616f63a0e5a072f37d039cd3
|
|
| MD5 |
d503ec334bc5e84d5de6d57720216629
|
|
| BLAKE2b-256 |
5acfa61b563b26b2f7b3ba8b69d8cec42940a9fb71b14e6124e4a2b7c2cbb48e
|