Name | dotenv-manager JSON |
Version |
0.1.0
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-09-13 05:01:28 |
maintainer | |
docs_url | None |
author | Teodor Toshkov |
requires_python | >=3.10,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# dotenv-manager
A decorator for defining a set of environment variables.
Uses the python-dotenv package to load additional variables from .env
The dotenv manager ensures the environment variables used in the project are set and have the correct types.
## Getting Started
```shell
pip install dotenv-manger
```
```python
from dotenv_manger import EnvManager
@EnvManager()
class CONFIG:
KEY1: str
KEY2: str
INT_KEY: int
```
Using the ```prefix``` parameter, it is possible to use a common prefix and separate the variables in groups.
```python
@EnvManager(prefix="AWS_")
class AWS_CONFIG:
SECRET: str
ENDPOINT: str
@EnvManager(prefix="AZURE_")
class AZURE_CONFIG:
SECRET: str
ENDPOINT: str
```
Using strict=False, an error message is printed to the terminal, instead of throwing an error.
```python
@EnvManager(strict=False)
class CONFIG:
NOT_FOUND_KEY: str
ENDPOINT: str
```
Raw data
{
"_id": null,
"home_page": "",
"name": "dotenv-manager",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Teodor Toshkov",
"author_email": "teodor.toshkov95@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ba/d1/e7fc3260e06c94c20e837d9cd395908f0a17b639b470e5f09e6d2031e3db/dotenv_manager-0.1.0.tar.gz",
"platform": null,
"description": "# dotenv-manager\n\nA decorator for defining a set of environment variables.\nUses the python-dotenv package to load additional variables from .env\n\nThe dotenv manager ensures the environment variables used in the project are set and have the correct types.\n\n## Getting Started\n\n```shell\npip install dotenv-manger\n```\n\n```python\nfrom dotenv_manger import EnvManager\n\n@EnvManager()\nclass CONFIG:\n KEY1: str\n KEY2: str\n INT_KEY: int\n```\nUsing the ```prefix``` parameter, it is possible to use a common prefix and separate the variables in groups.\n```python\n@EnvManager(prefix=\"AWS_\")\nclass AWS_CONFIG:\n SECRET: str\n ENDPOINT: str\n\n@EnvManager(prefix=\"AZURE_\")\nclass AZURE_CONFIG:\n SECRET: str\n ENDPOINT: str\n```\nUsing strict=False, an error message is printed to the terminal, instead of throwing an error.\n```python\n@EnvManager(strict=False)\nclass CONFIG:\n NOT_FOUND_KEY: str\n ENDPOINT: str\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ee7e7dd8a018b7453b2ce516a06fff45b24db1d089075db89ac4641e8bfe6ee8",
"md5": "315f63f110280be6217112c1568265af",
"sha256": "1250a60deddf6ce226bb5984207390716bc1a6fc8ac2d84d02671dbf4b18ccd8"
},
"downloads": -1,
"filename": "dotenv_manager-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "315f63f110280be6217112c1568265af",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 3641,
"upload_time": "2023-09-13T05:01:26",
"upload_time_iso_8601": "2023-09-13T05:01:26.408848Z",
"url": "https://files.pythonhosted.org/packages/ee/7e/7dd8a018b7453b2ce516a06fff45b24db1d089075db89ac4641e8bfe6ee8/dotenv_manager-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bad1e7fc3260e06c94c20e837d9cd395908f0a17b639b470e5f09e6d2031e3db",
"md5": "a9b76201e0fe146685ecedb816813367",
"sha256": "3fc5c8426c8b3837300b8f0e6c394510467c79dcbc81f25e3b7761c6297027b7"
},
"downloads": -1,
"filename": "dotenv_manager-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a9b76201e0fe146685ecedb816813367",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 2503,
"upload_time": "2023-09-13T05:01:28",
"upload_time_iso_8601": "2023-09-13T05:01:28.667947Z",
"url": "https://files.pythonhosted.org/packages/ba/d1/e7fc3260e06c94c20e837d9cd395908f0a17b639b470e5f09e6d2031e3db/dotenv_manager-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-13 05:01:28",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "dotenv-manager"
}