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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sitri-2.2.10.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.10.tar.gz
Algorithm Hash digest
SHA256 7785a8b085b636bd8f058c210417ba85c017dbbae7a7b48d04e4f85784b037b3
MD5 b92af153f53151c71ad3376a4b8e89dc
BLAKE2b-256 872b755c903887e0e93f35bb4be20a04586a8271560d59d4c079dc51d588af96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sitri-2.2.10-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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8a02157d36a829b6e6e913d1aaf628bf51252dc561725064357351083a04507e
MD5 1b86350e7c11f835327090ac6c5ac341
BLAKE2b-256 0a5aec8f256ce6aa26c4ba6dc99e4ba8dcc0bada098913ff9fab1d3863ca32ed

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