Name | polidoro-config JSON |
Version |
1.0.1
JSON |
| download |
home_page | None |
Summary | Package to manage configuration for you project. |
upload_time | 2024-08-21 19:23:54 |
maintainer | None |
docs_url | None |
author | Heitor Luis Polidoro |
requires_python | >=3.10 |
license | MIT |
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
[](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/code_quality.yml)
[](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/github-code-scanning/codeql)
[](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/pypi-publish.yml)
[](https://polidoro-config.readthedocs.io/en/latest/?badge=latest)
</br>
[](https://github.com/heitorpolidoro/polidoro-config/releases/latest)

</br>


</br>
[](https://github.com/heitorpolidoro/polidoro-config/issues)
[](https://github.com/heitorpolidoro/polidoro-config/pulls)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
</br>
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)
</br>
[](https://app.deepsource.com/gh/heitorpolidoro/polidoro-config/)
</br>

| Python Versions |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| &logo=python&label=3.10)<br/>&logo=python&label=3.11)<br/>&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[](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/code_quality.yml)\n[](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/github-code-scanning/codeql)\n[](https://github.com/heitorpolidoro/polidoro-config/actions/workflows/pypi-publish.yml)\n[](https://polidoro-config.readthedocs.io/en/latest/?badge=latest)\n</br>\n[](https://github.com/heitorpolidoro/polidoro-config/releases/latest)\n\n</br>\n\n\n</br>\n[](https://github.com/heitorpolidoro/polidoro-config/issues)\n[](https://github.com/heitorpolidoro/polidoro-config/pulls)\n\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n</br>\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n[](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_polidoro-config)\n</br>\n[](https://app.deepsource.com/gh/heitorpolidoro/polidoro-config/)\n</br>\n\n\n| Python Versions |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| &logo=python&label=3.10)<br/>&logo=python&label=3.11)<br/>&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"
}