Skip to main content

Pre-flight environment checks. Like Pydantic, but for your infra.

Project description

env-guard-checker

Lightweight pre-flight checks for Python projects.

Validate environment variables, services, endpoints and files before running your application.


Installation

pip install env-guard-checker

Requires Python 3.9+.


Quick example

envguard init
envguard check

Example output:

ENV VARS
✓ OPENAI_API_KEY present
✗ DATABASE_URL missing

TCP PORTS
✗ PostgreSQL connection refused

Configuration

Create an envguard.yaml file:

name: my-app

env_vars:
  - key: OPENAI_API_KEY
    required: true
    validate: starts_with:sk-

  - key: DATABASE_URL
    required: true
    validate: contains:postgresql

tcp_ports:
  - host: localhost
    port: 5432
    label: PostgreSQL

http_endpoints:
  - url: http://localhost:8000/health
    expect_status: 200

files:
  - path: .env
    type: file

CLI

envguard check
envguard check --hints
envguard check -c custom.yaml
envguard init

Exit codes:

  • 0 → success
  • 1 → failed checks

Use cases

  • Local development sanity checks
  • CI validation before deploy
  • Preventing common misconfiguration issues

Project

Source code: https://github.com/IvanYanishevskyi/env-guard


License

MIT

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

env_guard_checker-0.1.8.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

env_guard_checker-0.1.8-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file env_guard_checker-0.1.8.tar.gz.

File metadata

  • Download URL: env_guard_checker-0.1.8.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for env_guard_checker-0.1.8.tar.gz
Algorithm Hash digest
SHA256 55fd967a9c21b1470b7a99ec304774440c30c4e057627b09d33f75ea4cb17404
MD5 87a4587585b144e6af8e107570ddd5e1
BLAKE2b-256 2af59beb60bf2b27730bfb62629729006dd8b9803652e26673978a96ff69c642

See more details on using hashes here.

File details

Details for the file env_guard_checker-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for env_guard_checker-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7530825daac65d6e8e686883242964e2268341d49b35dac046ac0e5e2074e8e2
MD5 aebe44e0c40e69622cef8ae484c41d63
BLAKE2b-256 cf69c01ff83c2f293ff379d1f8f030e355284dd71f77cb3b791336e5c64219c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page