Skip to main content

Library for one endpoint config and credentials managment

Project description

Sitri Configuration Library

Build Status codecov PyPI Read the Docs CodeFactor Join the chat at https://gitter.im/lemegetonx/sitri

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)

Uploaded Source

Built Distribution

sitri-0.7.7-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

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

Hashes for sitri-0.7.7.tar.gz
Algorithm Hash digest
SHA256 28927998fa5d1b6c8a8e66d9234f83a9f16ad274c8dc9acf6786c9805b3a1042
MD5 284ddb52f141b06f00ec5229a61e012c
BLAKE2b-256 3433606a2307d06d98f1cd72a012380aa4586a7fd67b8a28dc51a30cf5f3232a

See more details on using hashes here.

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

Hashes for sitri-0.7.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f2595d799bf2c6272aab2adefb25c5f551275851b8bcfe9a3ff3a35d1fd67c07
MD5 0d45cc5f322bafa011d72b7406067d68
BLAKE2b-256 d0d74b19ee3b54af5c1043e13b3cc01407a5e179b274ccc6119d7d037d699cee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page