envmaster 🔐
Type-safe environment variable management for Python.
Installation
pip install envmaster
Usage
from envmaster import env
# String (required)
DATABASE_URL = env.str("DATABASE_URL", required=True)
# Boolean with default
DEBUG = env.bool("DEBUG", default=False)
# Integer with default
MAX_CONNECTIONS = env.int("MAX_CONNECTIONS", default=10)
# Float
TIMEOUT = env.float("TIMEOUT", default=30.0)
# List (comma-separated)
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["localhost"])
# JSON
CONFIG = env.json("CONFIG", default={})
Methods
| Method | Return Type | Description |
|---|---|---|
env.str() |
str | String value |
env.int() |
int | Integer value |
env.float() |
float | Float value |
env.bool() |
bool | Boolean value |
env.list() |
list | List of strings |
env.json() |
any | Parsed JSON |
Boolean Values
Truthy: true, 1, yes, on
Falsy: false, 0, no, off
Error Handling
from envmaster import env, EnvError
try:
secret = env.str("SECRET_KEY", required=True)
except EnvError as e:
print(f"Configuration error: {e}")
License
MIT
Metadata
Release files for envmaster 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| envmaster-1.0.0.tar.gz | 2.8 kB | Without provenance | Details for envmaster-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| envmaster-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for envmaster-1.0.0-py3-none-any.whl |
Total release size: 6.0 kB
Release files / envmaster-1.0.0.tar.gz
| Download URL | envmaster-1.0.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22264aa492b193430d23e0837a181b4bc0da854b5a5145e6a7359d79cfd099bd
|
|
BLAKE2b-256 checksum How to use checksums |
0c9f7d7e49c860d988ff35d240179f30d76f0453e41025e2ba00e3ead36a727d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / envmaster-1.0.0-py3-none-any.whl
| Download URL | envmaster-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a6bf0a73fd19070ba91b63433029c4aadf7ff74810df737f6ed69fb87c51a05
|
|
BLAKE2b-256 checksum How to use checksums |
e7900d0c94821772723a1b51ef2a1aad7c4e54e7a1921deb0e9aba0b39c0d82a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for envmaster 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.