sitri


Namesitri JSON
Version 2.2.12 PyPI version JSON
download
home_page
SummaryLibrary for one endpoint config managment
upload_time2023-01-11 17:26:14
maintainer
docs_urlNone
author
requires_python>=3.7,<3.12
licenseMIT
keywords packaging poetry config configuration managment vault pydantic json yaml environment
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://github.com/elastoo-team/sitri">
    <img src="https://raw.githubusercontent.com/Elastoo-Team/sitri/master/docs/logo.svg">
  </a>
  <h1 align="center">
    Sitri - powerful settings & configs for python
  </h1>
</p>

[![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 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:*
```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/


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "sitri",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<3.12",
    "maintainer_email": "",
    "keywords": "packaging,poetry,config,configuration,managment,vault,pydantic,json,yaml,environment",
    "author": "",
    "author_email": "Alexander Lavrov <admin@egnod.dev>",
    "download_url": "https://files.pythonhosted.org/packages/a5/b4/9973d8a714b11a9c66cef4681b873b2061dffc19de8a45887d896ca65745/sitri-2.2.12.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://github.com/elastoo-team/sitri\">\n    <img src=\"https://raw.githubusercontent.com/Elastoo-Team/sitri/master/docs/logo.svg\">\n  </a>\n  <h1 align=\"center\">\n    Sitri - powerful settings & configs for python\n  </h1>\n</p>\n\n[![PyPI](https://img.shields.io/pypi/v/sitri)](https://pypi.org/project/sitri/)\n[![codecov](https://codecov.io/gh/Elastoo-Team/sitri/branch/master/graph/badge.svg)](https://codecov.io/gh/elastoo-team/sitri)\n[![Maintainability](https://api.codeclimate.com/v1/badges/625f1d869adbf4128f75/maintainability)](https://codeclimate.com/github/Elastoo-Team/sitri/maintainability)\n![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/Elastoo-Team/sitri)\n[![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)\n[![Read the Docs](https://img.shields.io/readthedocs/sitri)](https://sitri.readthedocs.io)\n\nSitri - library for managing authorization and configuration data from a single object with possibly different or identical providers\n\n#  Installation\n\n```bash\npoetry add sitri -E \"all\"\n```\n\nor\n```bash\npip3 install sitri[all]\n```\n\n*Extras* packs and providers:\n\n    1. all - all providers and settings module.\n    2. settings - pydantic, providers with settings-support.\n    3. redis - for redis provider.\n    4. hvac - for HashiCorp Vault provider.\n    5. vedis - for vedis provider.\n    6. pyyaml - for YAML provider.\n    7. orjson - speed-up your json provider (optional).\n\n\n# Basics with SystemProvider\n\n```python\nfrom sitri.providers.contrib import SystemConfigProvider\nfrom sitri import Sitri\n\nconf = Sitri(\n    config_provider=SystemConfigProvider(prefix=\"basics\"),\n)\n```\nSystem provider use system environment for get config data. For unique - sitri lookup to \"namespace\" by prefix.\n\nExample:\n\n*In console:*\n```bash\nexport BASICS_NAME=Huey\n```\n\n*In code:*\n```python\nname = conf.get_config(\"name\")\n\nprint(name)  # output: Huey\n```\n\n#  Docs\nRead base API references and other part documentation on https://sitri.readthedocs.io/\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for one endpoint config managment",
    "version": "2.2.12",
    "split_keywords": [
        "packaging",
        "poetry",
        "config",
        "configuration",
        "managment",
        "vault",
        "pydantic",
        "json",
        "yaml",
        "environment"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "086d4a1f4da1926ab2bbd1fe3cbd742e7b8cd94aec9c14cb19d8a5757ebffe00",
                "md5": "1863ee0b0d2d54feac6f8f41704bd831",
                "sha256": "072de3ce6e0668963a9e9d5f85d4b0de0c0173a6a99e8ee59e87515a78477cd9"
            },
            "downloads": -1,
            "filename": "sitri-2.2.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1863ee0b0d2d54feac6f8f41704bd831",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<3.12",
            "size": 20684,
            "upload_time": "2023-01-11T17:26:13",
            "upload_time_iso_8601": "2023-01-11T17:26:13.782261Z",
            "url": "https://files.pythonhosted.org/packages/08/6d/4a1f4da1926ab2bbd1fe3cbd742e7b8cd94aec9c14cb19d8a5757ebffe00/sitri-2.2.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5b49973d8a714b11a9c66cef4681b873b2061dffc19de8a45887d896ca65745",
                "md5": "3dd47e68a5cc9576f48e2f94d317b3ff",
                "sha256": "fd0d801d63787d0df55de93129543a634ee74835e4362d31e846a2a9b542fa50"
            },
            "downloads": -1,
            "filename": "sitri-2.2.12.tar.gz",
            "has_sig": false,
            "md5_digest": "3dd47e68a5cc9576f48e2f94d317b3ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<3.12",
            "size": 20151,
            "upload_time": "2023-01-11T17:26:14",
            "upload_time_iso_8601": "2023-01-11T17:26:14.966343Z",
            "url": "https://files.pythonhosted.org/packages/a5/b4/9973d8a714b11a9c66cef4681b873b2061dffc19de8a45887d896ca65745/sitri-2.2.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-11 17:26:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "sitri"
}
        
Elapsed time: 0.14896s