Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elastoo-team/sitri
Sitri - powerful settings & configs for python
https://github.com/elastoo-team/sitri
app-config app-configuration config configuration configuration-management environment-variables pydantic vault
Last synced: 2 months ago
JSON representation
Sitri - powerful settings & configs for python
- Host: GitHub
- URL: https://github.com/elastoo-team/sitri
- Owner: Elastoo-Team
- License: mit
- Created: 2019-10-02T14:53:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T21:25:49.000Z (over 1 year ago)
- Last Synced: 2024-08-10T09:05:37.837Z (5 months ago)
- Topics: app-config, app-configuration, config, configuration, configuration-management, environment-variables, pydantic, vault
- Language: Python
- Homepage: https://sitri.readthedocs.io/en/latest/
- Size: 685 KB
- Stars: 23
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Sitri - powerful settings & configs for python
[![PyPI](https://img.shields.io/pypi/v/sitri)](https://pypi.org/project/sitri/)
[![codecov](https://codecov.io/gh/Elastoo-Team/sitri/branch/master/graph/badge.svg)](https://codecov.io/gh/elastoo-team/sitri)
[![Maintainability](https://api.codeclimate.com/v1/badges/625f1d869adbf4128f75/maintainability)](https://codeclimate.com/github/Elastoo-Team/sitri/maintainability)
![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/Elastoo-Team/sitri)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FElastoo-Team%2Fsitri%2Fbadge&style=popout)](https://actions-badge.atrox.dev/Elastoo-Team/sitri/goto)
[![Read the Docs](https://img.shields.io/readthedocs/sitri)](https://sitri.readthedocs.io)Sitri - library for managing authorization and configuration data from a single object with possibly different or identical providers
# Installation
```bash
poetry add sitri -E "all"
```or
```bash
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
```python
from sitri.providers.contrib import SystemConfigProvider
from sitri import Sitriconf = 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:*
```bash
export BASICS_NAME=Huey
```*In code:*
```python
name = conf.get_config("name")print(name) # output: Huey
```# Docs
Read base API references and other part documentation on https://sitri.readthedocs.io/