Skip to main content

Library for one endpoint config managment

Project description

Sitri - powerful settings & configs for python

PyPI codecov Maintainability Code Climate technical debt Build Status Read the Docs

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

sitri-2.2.12.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sitri-2.2.12-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

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

Hashes for sitri-2.2.12.tar.gz
Algorithm Hash digest
SHA256 fd0d801d63787d0df55de93129543a634ee74835e4362d31e846a2a9b542fa50
MD5 3dd47e68a5cc9576f48e2f94d317b3ff
BLAKE2b-256 a5b49973d8a714b11a9c66cef4681b873b2061dffc19de8a45887d896ca65745

See more details on using hashes here.

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

Hashes for sitri-2.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 072de3ce6e0668963a9e9d5f85d4b0de0c0173a6a99e8ee59e87515a78477cd9
MD5 1863ee0b0d2d54feac6f8f41704bd831
BLAKE2b-256 086d4a1f4da1926ab2bbd1fe3cbd742e7b8cd94aec9c14cb19d8a5757ebffe00

See more details on using hashes here.

Supported by

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