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. structlog - structlog package if your app does not provide structlog (optional, default logging package also support).
8. ujson - 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
sitri-2.1.4.tar.gz
(12.2 kB
view details)
Built Distribution
sitri-2.1.4-py3-none-any.whl
(20.0 kB
view details)
File details
Details for the file sitri-2.1.4.tar.gz
.
File metadata
- Download URL: sitri-2.1.4.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f1c8cfafc41883e6b7347e19f045699230657bb6c7f30d52fc88888435d4bd |
|
MD5 | dbd41170cb72036b04d3d2b0bbbdf494 |
|
BLAKE2b-256 | 525bf677b7717ebed727adba41eea38baaf5cf6ebff2b2b36726953c9321f91a |
File details
Details for the file sitri-2.1.4-py3-none-any.whl
.
File metadata
- Download URL: sitri-2.1.4-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 340d5945e595ab33e59c8dbd0795e65e7f6302792de360a507ea21425930b1af |
|
MD5 | ead728da01be85f9561d6582a3932a3c |
|
BLAKE2b-256 | 2a21e176fcf51f7425e81075aba28c440b35e563a59399cd592724d958a6831c |