Skip to main content

Compare .env files — find missing variables before they find you

Project description

dotcompare

Compare .env files — find missing variables before they find you


Install

pip install dotcompare

Usage

from dotcompare import compare_env_files

diff = compare_env_files(".env.example", ".env")
print(diff.summary())

Output:

Missing in target (2):
  - DATABASE_URL
  - SECRET_KEY
Extra in target (1):
  + DEBUG_MODE

Features

  • Compare any two .env files
  • Find missing, extra, and changed variables
  • Colored terminal output
  • Value comparison (optional)
  • Handles comments, blank lines, quoted values
  • Zero dependencies
  • Use in CI to block deploys with missing env vars

CI Integration

- name: Check env vars
  run: python -c "
    from dotcompare import compare_env_files
    diff = compare_env_files('.env.example', '.env.production')
    if diff.has_issues:
      print(diff.summary())
      exit(1)
  "

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

dotcompare-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

dotcompare-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file dotcompare-0.1.0.tar.gz.

File metadata

  • Download URL: dotcompare-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dotcompare-0.1.0.tar.gz
Algorithm Hash digest
SHA256 27b20fd3f17536657017635f17e5818747787e45edea1e9fb432a72e1b469ef6
MD5 abd30a99fe83829275a26ad9930c0be8
BLAKE2b-256 ef7383fbe967af9cfcafa020569d839f7b1d7e3f6fbbad533f9f9a4d86aacef5

See more details on using hashes here.

File details

Details for the file dotcompare-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dotcompare-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dotcompare-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68699246ffbd89305a02b0e3c42d00f507bab2363e25b27e69321741378ae606
MD5 00035211a8a2b46973dfbe2bed876d92
BLAKE2b-256 d560140bf25490dae1e06990f6eafdf356452dbe63c2944df5fba4f73c994273

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