Tiny zero-dependency environment variable loader with type casting and .env.example generation
Project description
telepop-env
Tinyenv zero-dependency environment variable loader for Python.
Reads .env + os.environ, supports type casting, validation, and .env.example generation.
Features:
Zero dependencies
Automatic type casting (bool, int, float, str)
Required variable check
.env.example generation from used variables
Install
pip install telepop-env
usage
from telepop_env import env
DEBUG = env.bool("DEBUG", default=False)
DB_PORT = env.int("DB_PORT", required=True)
DB_URL = env.str("DB_URL", default="sqlite:///:memory:")
print(DEBUG, DB_PORT, DB_URL)
generate .env with
from telepop_env import env
# call function
env.generate_example()
result will be like
DEBUG=true
DB_PORT=5432
Pypi page:
Project details
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 telepop_env-0.1.4.tar.gz.
File metadata
- Download URL: telepop_env-0.1.4.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b352c100cdd4bdc5b0f50e9370225cba3724b57404e46ea56c9a63b7eae004b
|
|
| MD5 |
a3889fc255c95fe304f156976f6eb189
|
|
| BLAKE2b-256 |
6750ad7ea3a2e63f4217ef80805dba53b809b2d6afc5bf5e2444fc4c9a0de607
|
File details
Details for the file telepop_env-0.1.4-py3-none-any.whl.
File metadata
- Download URL: telepop_env-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66781408f5d5d5dbf68f03d6305accc3d1754ba27bdeb07185c51bf0ee9d50ce
|
|
| MD5 |
c5cce6f5794f6ce06dc51e54fa6848e7
|
|
| BLAKE2b-256 |
7548a758d6d119d25f8283bb9d99c970ae2077a38c795dd23583902525124640
|