Python wrapper for EnvGuard — validate .env files against a YAML schema
Project description
envguard-validator (Python)
Python wrapper for EnvGuard — validate
.envfiles against a declarative YAML schema.
Install
pip install envguard-validator
The correct EnvGuard binary for your platform is downloaded automatically on first use.
Quick Start
from envguard import validate
result = validate(schema_path="envguard.yaml", env_path=".env")
if not result.valid:
for error in result.errors:
print(f"{error.key}: {error.message}")
exit(1)
print("✓ Environment validated!")
CLI
envguard-py validate --schema envguard.yaml --env .env
API
validate(schema_path=None, env_path=None, strict=False) → ValidationResult
Validates a .env file against a schema.
Returns:
ValidationResult.valid—boolValidationResult.errors—list[ValidationError]ValidationResult.warnings—list[ValidationError]
Each ValidationError has:
key— variable namemessage— human-readable errorrule— rule that failed (required,type,pattern,enum,strict)
License
MIT
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 envguard_validator-0.1.4.tar.gz.
File metadata
- Download URL: envguard_validator-0.1.4.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df49903b6050d0985d235ceebda0c225bf706f5c9454aeb78c1b41699fcadf5
|
|
| MD5 |
65316e4b8a5224bea0f85b862c96e88e
|
|
| BLAKE2b-256 |
c56c619171cd9ecbbd40ba284a90c957e10791833cd6094491409819a88bb9fd
|
File details
Details for the file envguard_validator-0.1.4-py3-none-any.whl.
File metadata
- Download URL: envguard_validator-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74624ecc1b4c736142a7ca3b09f049c0de462391746330671a6fa2cace52abea
|
|
| MD5 |
475773644cb399c4c1acb0f9407528db
|
|
| BLAKE2b-256 |
76f8f75994cd1164ae6a41ffe71e22ffc697681e68a193ceb043574092a698f4
|