config-joker-0.3.0
توضیحات
A package to ease usage of different configuration conditions in your projects.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | config-joker-0.3.0 |
| نام | config-joker |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Joao Pedro Mendes Goulart |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/config-joker/ |
| مجوز | - |
# 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](https://github.com/joaopedromgoulart/config-joker/tree/main/examples)
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.
نیازمندی
| مقدار | نام |
|---|---|
| >=2023.3.23,<2024.0.0 | regex |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl config-joker-0.3.0:
pip install config-joker-0.3.0.whl
نصب پکیج tar.gz config-joker-0.3.0:
pip install config-joker-0.3.0.tar.gz