polidoro-config


Namepolidoro-config JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryPackage to manage configuration for you project.
upload_time2024-08-21 19:23:54
maintainerNone
docs_urlNone
authorHeitor Luis Polidoro
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Polidoro Config

Polidoro Config it is a configuration manager for you project

[![Code Quality](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/code_quality.yml/badge.svg)](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/code_quality.yml)
[![CodeQL](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/github-code-scanning/codeql)
[![Upload Python Package](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/pypi-publish.yml/badge.svg)](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/pypi-publish.yml)
[![Documentation Status](https://readthedocs.org/projects/polidoro-config/badge/?version=latest)](https://polidoro-config.readthedocs.io/en/latest/?badge=latest)
</br>
[![Latest Version](https://img.shields.io/github/v/release/heitorpolidoro/polidoro-config?label=Latest%20Version)](https://github.com/heitorpolidoro/polidoro-config/releases/latest)
![GitHub Release Date](https://img.shields.io/github/release-date/heitorpolidoro/polidoro-config)
</br>
![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/heitorpolidoro/polidoro-config/latest)
![GitHub last commit](https://img.shields.io/github/last-commit/heitorpolidoro/polidoro-config)
</br>
[![GitHub issues](https://img.shields.io/github/issues/heitorpolidoro/polidoro-config)](https://github.com/heitorpolidoro/polidoro-config/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/heitorpolidoro/polidoro-config)](https://github.com/heitorpolidoro/polidoro-config/pulls)

[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=coverage)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
</br>
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=bugs)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
</br>
[![DeepSource](https://app.deepsource.com/gh/heitorpolidoro/polidoro-config.svg/?label=active+issues&show_trend=true&token=hZuHoQ-gd4kIPgNuSX0X_QT2)](https://app.deepsource.com/gh/heitorpolidoro/polidoro-config/)
</br>
![PyPI](https://img.shields.io/pypi/v/polidoro-config?label=PyPi%20package)

| Python Versions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ![GitHub branch check runs](https://img.shields.io/github/check-runs/heitorpolidoro/polidoro-config/master?nameFilter=Code%20Quality%20%2F%20Tests%20(3.10)&logo=python&label=3.10)<br/>![GitHub branch check runs](https://img.shields.io/github/check-runs/heitorpolidoro/polidoro-config/master?nameFilter=Code%20Quality%20%2F%20Tests%20(3.11)&logo=python&label=3.11)<br/>![GitHub branch check runs](https://img.shields.io/github/check-runs/heitorpolidoro/polidoro-config/master?nameFilter=Code%20Quality%20%2F%20Tests%20(3.12)&logo=python&label=3.12) |

## Basic Usage

Create a class inheriting from ConfigBase

```python
from pconfig import ConfigBase

class Config(ConfigBase):
	DB_HOST = 'localhost'
	ENVIRONMENT = 'development'
	...
```

When the class is instantiated will load from environment variables.

```python
# script.py
from pconfig import ConfigBase

class Config(ConfigBase):
	MY_VAR = 'default_value'

print(Config.MY_VAR)
```

```shell
>>> python script.py
default_value

>>> MY_VAR="new_value" python script.py
new_value
```

If you have the [`python-dotenv`](https://pypi.org/project/python-dotenv/) installed will load the `.env` automatically.
Also, you can load from a `.yaml` file setting the file path in the `Config` class:
```python
# script.py
from pconfig import ConfigBase

class Config(ConfigBase):
	file_path = "my_config.yml"
	MY_VAR = 'default_value'

```

For more information see the [Documentation](https://polidoro-config.readthedocs.io/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "polidoro-config",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Heitor Luis Polidoro",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5f/b3/9d6b0d548a224dce73029124e0b5fa99c9a99529d78b8df7bee250f030ba/polidoro_config-1.0.1.tar.gz",
    "platform": null,
    "description": "# Polidoro Config\n\nPolidoro Config it is a configuration manager for you project\n\n[![Code Quality](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/code_quality.yml/badge.svg)](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/code_quality.yml)\n[![CodeQL](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/github-code-scanning/codeql)\n[![Upload Python Package](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/pypi-publish.yml/badge.svg)](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/pypi-publish.yml)\n[![Documentation Status](https://readthedocs.org/projects/polidoro-config/badge/?version=latest)](https://polidoro-config.readthedocs.io/en/latest/?badge=latest)\n</br>\n[![Latest Version](https://img.shields.io/github/v/release/heitorpolidoro/polidoro-config?label=Latest%20Version)](https://github.com/heitorpolidoro/polidoro-config/releases/latest)\n![GitHub Release Date](https://img.shields.io/github/release-date/heitorpolidoro/polidoro-config)\n</br>\n![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/heitorpolidoro/polidoro-config/latest)\n![GitHub last commit](https://img.shields.io/github/last-commit/heitorpolidoro/polidoro-config)\n</br>\n[![GitHub issues](https://img.shields.io/github/issues/heitorpolidoro/polidoro-config)](https://github.com/heitorpolidoro/polidoro-config/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/heitorpolidoro/polidoro-config)](https://github.com/heitorpolidoro/polidoro-config/pulls)\n\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=coverage)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n</br>\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=bugs)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_polidoro-config&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n</br>\n[![DeepSource](https://app.deepsource.com/gh/heitorpolidoro/polidoro-config.svg/?label=active+issues&show_trend=true&token=hZuHoQ-gd4kIPgNuSX0X_QT2)](https://app.deepsource.com/gh/heitorpolidoro/polidoro-config/)\n</br>\n![PyPI](https://img.shields.io/pypi/v/polidoro-config?label=PyPi%20package)\n\n| Python Versions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ![GitHub branch check runs](https://img.shields.io/github/check-runs/heitorpolidoro/polidoro-config/master?nameFilter=Code%20Quality%20%2F%20Tests%20(3.10)&logo=python&label=3.10)<br/>![GitHub branch check runs](https://img.shields.io/github/check-runs/heitorpolidoro/polidoro-config/master?nameFilter=Code%20Quality%20%2F%20Tests%20(3.11)&logo=python&label=3.11)<br/>![GitHub branch check runs](https://img.shields.io/github/check-runs/heitorpolidoro/polidoro-config/master?nameFilter=Code%20Quality%20%2F%20Tests%20(3.12)&logo=python&label=3.12) |\n\n## Basic Usage\n\nCreate a class inheriting from ConfigBase\n\n```python\nfrom pconfig import ConfigBase\n\nclass Config(ConfigBase):\n\tDB_HOST = 'localhost'\n\tENVIRONMENT = 'development'\n\t...\n```\n\nWhen the class is instantiated will load from environment variables.\n\n```python\n# script.py\nfrom pconfig import ConfigBase\n\nclass Config(ConfigBase):\n\tMY_VAR = 'default_value'\n\nprint(Config.MY_VAR)\n```\n\n```shell\n>>> python script.py\ndefault_value\n\n>>> MY_VAR=\"new_value\" python script.py\nnew_value\n```\n\nIf you have the [`python-dotenv`](https://pypi.org/project/python-dotenv/) installed will load the `.env` automatically.\nAlso, you can load from a `.yaml` file setting the file path in the `Config` class:\n```python\n# script.py\nfrom pconfig import ConfigBase\n\nclass Config(ConfigBase):\n\tfile_path = \"my_config.yml\"\n\tMY_VAR = 'default_value'\n\n```\n\nFor more information see the [Documentation](https://polidoro-config.readthedocs.io/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package to manage configuration for you project.",
    "version": "1.0.1",
    "project_urls": {
        "Documentation": "https://polidoro-config.readthedocs.io/",
        "Homepage": "https://github.com/heitorpolidoro/polidoro-config"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1663ee7e1796c635241be87e57384cc3c6f3f9fa976de298d19a2d1274bf37f2",
                "md5": "3d39e8b6f5ff2f722f151b8e86e9b95d",
                "sha256": "12e25e836f9e6a50a950fface9b24f91fcca3b9f423c42680a96c661eb7207e4"
            },
            "downloads": -1,
            "filename": "polidoro_config-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d39e8b6f5ff2f722f151b8e86e9b95d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10898,
            "upload_time": "2024-08-21T19:23:53",
            "upload_time_iso_8601": "2024-08-21T19:23:53.744223Z",
            "url": "https://files.pythonhosted.org/packages/16/63/ee7e1796c635241be87e57384cc3c6f3f9fa976de298d19a2d1274bf37f2/polidoro_config-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fb39d6b0d548a224dce73029124e0b5fa99c9a99529d78b8df7bee250f030ba",
                "md5": "68126b7dad3988e5f624a3cb7e2a2fbb",
                "sha256": "d0f4bdaa289128efc7a30279abf0d9aa43fbbfc68aa00a6493152dd2d3b5cfc6"
            },
            "downloads": -1,
            "filename": "polidoro_config-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "68126b7dad3988e5f624a3cb7e2a2fbb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 17841,
            "upload_time": "2024-08-21T19:23:54",
            "upload_time_iso_8601": "2024-08-21T19:23:54.861057Z",
            "url": "https://files.pythonhosted.org/packages/5f/b3/9d6b0d548a224dce73029124e0b5fa99c9a99529d78b8df7bee250f030ba/polidoro_config-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-21 19:23:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "heitorpolidoro",
    "github_project": "polidoro-config",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "polidoro-config"
}
        
Elapsed time: 0.42925s