Skip to main content

EnvGuard

envguard-validator (Python)

Python wrapper for EnvGuard — validate .env files 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 — bool
  • ValidationResult.errors — list[ValidationError]
  • ValidationResult.warnings — list[ValidationError]

Each ValidationError has:

  • key — variable name
  • message — human-readable error
  • rule — rule that failed (required, type, pattern, enum, strict)

License

MIT

Metadata

Release files for envguard-validator 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for envguard-validator 2.1.0
File Size Uploaded Provenance Actions
envguard_validator-2.1.0.tar.gz 6.0 kB Without provenance Details for envguard_validator-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for envguard-validator 2.1.0
File Interpreter ABI Platform Actions
envguard_validator-2.1.0-py3-none-any.whl Python 3 none any Details for envguard_validator-2.1.0-py3-none-any.whl

Total release size: 12.0 kB

Release files / envguard_validator-2.1.0.tar.gz

Download URL envguard_validator-2.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
85b2be593a643007287619aa7cda2c2e24969f1970aecf67f8b1a97d2d0e757a
BLAKE2b-256 checksum
How to use checksums
19a18692b2b33f3e1a6b74ae0ddf01d18d81664094fad5b787487b6c0f2712c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / envguard_validator-2.1.0-py3-none-any.whl

Download URL envguard_validator-2.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ec35bbfc7375305d431295454f4a7275a263ce0caf64f0129d1e73c61e6e2c5
BLAKE2b-256 checksum
How to use checksums
0dd84ae25dc36e2e36a657b0f7d80f44e17aff33b876f0cdce88fdfc3f2a79dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for envguard-validator 2.1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page