No project description provided
Project description
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
pip install dotenv-manager
from dotenv_manager import EnvManager
@EnvManager()
class CONFIG:
KEY1: str
KEY2: str
INT_KEY: int
>>> print(CONFIG.KEY1)
"<KEY1>"
Using the prefix parameter, it is possible to use a common prefix and separate the variables in groups.
@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.
@EnvManager(strict=False)
class CONFIG:
NOT_FOUND_KEY: str
ENDPOINT: str
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dotenv_manager-0.1.1.tar.gz.
File metadata
- Download URL: dotenv_manager-0.1.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c455c371d8931e39e5f1884597cc36fbcc761ff93104060e26f7be57a9ce9209
|
|
| MD5 |
ccd6beaa5cc4ace8960cf41c9329d94a
|
|
| BLAKE2b-256 |
0d83823a7989e50e5f4c59a2eef978fbca34b901b83fa0d75016e99639ef1ba8
|
File details
Details for the file dotenv_manager-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dotenv_manager-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d18073b4f79715f046526685b5ba12f0085949fc865913486e66df4e3d5a913
|
|
| MD5 |
e31e176f5cf57d35273ee8012f302a24
|
|
| BLAKE2b-256 |
a6d67867758a3acd32e81b4b5691410406f4e2ef5a6b2fd88604902196ba779d
|