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.8.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

sitri-2.2.8-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file sitri-2.2.8.tar.gz.

File metadata

  • Download URL: sitri-2.2.8.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.2.1 CPython/3.10.8

File hashes

Hashes for sitri-2.2.8.tar.gz
Algorithm Hash digest
SHA256 23b5bdadec6254368bfd52e95bf54f116928f953c4ada8ff537b3cac9941b7cb
MD5 a101285d5dff1df1d1162b32db78f1a4
BLAKE2b-256 374fb3f9252cb5d376f725a4147ac889c1e6ed073a66b0f30a90d157efc8f8d7

See more details on using hashes here.

File details

Details for the file sitri-2.2.8-py3-none-any.whl.

File metadata

  • Download URL: sitri-2.2.8-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.2.1 CPython/3.10.8

File hashes

Hashes for sitri-2.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2addec2a439e8b145c0415144d5a1c05d67df90a194a7cc88bb37d83ab33d75c
MD5 a46df9a8b8d173ba2854c6cada082673
BLAKE2b-256 dbe60c85dd176f27aa539845dbbcc845eb9a3ce309c957a5c172b8fc793533bc

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