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.7.tar.gz
(7.9 kB
view details)
Built Distribution
sitri-0.7.7-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file sitri-0.7.7.tar.gz
.
File metadata
- Download URL: sitri-0.7.7.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28927998fa5d1b6c8a8e66d9234f83a9f16ad274c8dc9acf6786c9805b3a1042 |
|
MD5 | 284ddb52f141b06f00ec5229a61e012c |
|
BLAKE2b-256 | 3433606a2307d06d98f1cd72a012380aa4586a7fd67b8a28dc51a30cf5f3232a |
File details
Details for the file sitri-0.7.7-py3-none-any.whl
.
File metadata
- Download URL: sitri-0.7.7-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2595d799bf2c6272aab2adefb25c5f551275851b8bcfe9a3ff3a35d1fd67c07 |
|
MD5 | 0d45cc5f322bafa011d72b7406067d68 |
|
BLAKE2b-256 | d0d74b19ee3b54af5c1043e13b3cc01407a5e179b274ccc6119d7d037d699cee |