Library for one endpoint config and credentials managment
Project description
Sitri Configuration Library
Sitri - library for managing authorization and configuration data from a single object with possibly different or identical providers
Installation
poetry add sitri
or
pip3 install sitri
Basics with SystemProvider
from sitri.contrib.system import SystemCredentialProvider, SystemConfigProvider
from sitri import Sitri
conf = Sitri(config_provider=SystemConfigProvider(prefix="basics"),
credential_provider=SystemCredentialProvider(prefix="basics"))
System provider use system environment for get config and credential 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-0.7.3.tar.gz
(7.9 kB
view hashes)
Built Distribution
sitri-0.7.3-py3-none-any.whl
(11.9 kB
view hashes)