Library for one endpoint config managment
Project description
Sitri - powerful settings & configs for python
Sitri - library for managing authorization and configuration data from a single object with possibly different or identical providers
Installation
poetry add sitri -E "all"
or
pip3 install sitri[all]
Extras packs and providers:
1. all - all providers and settings module.
2. settings - pydantic, providers with settings-support.
3. redis - for redis provider.
4. hvac - for HashiCorp Vault provider.
5. vedis - for vedis provider.
6. pyyaml - for YAML provider.
7. orjson - speed-up your json provider (optional).
Basics with SystemProvider
from sitri.providers.contrib import SystemConfigProvider
from sitri import Sitri
conf = Sitri(
config_provider=SystemConfigProvider(prefix="basics"),
)
System provider use system environment for get config data. For unique - sitri lookup to "namespace" by prefix.
Example:
In console:
export BASICS_NAME=Huey
In code:
name = conf.get_config("name")
print(name) # output: Huey
Docs
Read base API references and other part documentation on https://sitri.readthedocs.io/
Project details
Release history Release notifications | RSS feed
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 sitri-2.2.12.tar.gz.
File metadata
- Download URL: sitri-2.2.12.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.3.4 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd0d801d63787d0df55de93129543a634ee74835e4362d31e846a2a9b542fa50
|
|
| MD5 |
3dd47e68a5cc9576f48e2f94d317b3ff
|
|
| BLAKE2b-256 |
a5b49973d8a714b11a9c66cef4681b873b2061dffc19de8a45887d896ca65745
|
File details
Details for the file sitri-2.2.12-py3-none-any.whl.
File metadata
- Download URL: sitri-2.2.12-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.3.4 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
072de3ce6e0668963a9e9d5f85d4b0de0c0173a6a99e8ee59e87515a78477cd9
|
|
| MD5 |
1863ee0b0d2d54feac6f8f41704bd831
|
|
| BLAKE2b-256 |
086d4a1f4da1926ab2bbd1fe3cbd742e7b8cd94aec9c14cb19d8a5757ebffe00
|