confdoggo-0.1.0a1
توضیحات
Your personal configuration doggo.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | confdoggo-0.1.0a1 |
| نام | confdoggo |
| نسخه کتابخانه | 0.1.0a1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Daniele Parmeggiani |
| ایمیل نویسنده | git@danieleparmeggiani.me |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/confdoggo/ |
| مجوز | - |
# confdoggo 🐶
Define your builtin settings:
```python
class MySettings(confdoggo.Settings):
class _(confdoggo.Settings):
host: str = "localhost"
port: int = 8080
server = _()
class _(confdoggo.Settings):
x: int = 42
client = _()
reload_on_changes = True
scheduled_shutdown: datetime = None
```
Let confdoggo catch the configuration files, and run extensible type checking:
```python
settings = confdoggo.go_catch(
MySettings,
[
'file://./simple.json', # a local file
Path('.') / 'another_one.yaml', # another local file
'ftp://192.168.1.1/folder/file.json', # a remote file
'https://192.168.1.2/folder/file.ini', # another remote file
],
)
```
Note: order matters! Configurations that have a higher index have higher importance.
Access configuration easily:
```python
assert settings.server.port == 8080
```
See a full example [here](./examples/simple.py).
## Install
```bash
$ pip install confdoggo
```
## Under development
This project is under development: expect breaking changes!
نیازمندی
| مقدار | نام |
|---|---|
| >=1.6.1 | pydantic |
| >=0.10.3,<0.11.0) | watchdog |
| >=5.3.1,<6.0.0) | PyYAML |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl confdoggo-0.1.0a1:
pip install confdoggo-0.1.0a1.whl
نصب پکیج tar.gz confdoggo-0.1.0a1:
pip install confdoggo-0.1.0a1.tar.gz