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. structlog - structlog package if your app does not provide structlog (optional, default logging package also support).
8. ujson - 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.1.3.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

sitri-2.1.3-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sitri-2.1.3.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-1014-azure

File hashes

Hashes for sitri-2.1.3.tar.gz
Algorithm Hash digest
SHA256 2290cece2ad7efd225c9c551c5c4b37acc0be267b611b73ce797be056c30602d
MD5 d2654b128745491090dea0ea41179171
BLAKE2b-256 177cfb0d33b07a4bafe162d68024c754e2015ced0d7b6e80320ac2e8dad0a21f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sitri-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-1014-azure

File hashes

Hashes for sitri-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3498f7fb16ddf6dd7c7074f0e0d8d9cc8cbe237b211fa9c767fb4ee27ab1098b
MD5 a6032b56a74e3c527ef01777fbf1fb50
BLAKE2b-256 f14bb876fe86d44b6ed3a00505c3458d96c022a5e3fd9752dc3b7262ea8d5312

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