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
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
dotcompare-0.1.0.tar.gz
(3.6 kB
view details)
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27b20fd3f17536657017635f17e5818747787e45edea1e9fb432a72e1b469ef6
|
|
| MD5 |
abd30a99fe83829275a26ad9930c0be8
|
|
| BLAKE2b-256 |
ef7383fbe967af9cfcafa020569d839f7b1d7e3f6fbbad533f9f9a4d86aacef5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68699246ffbd89305a02b0e3c42d00f507bab2363e25b27e69321741378ae606
|
|
| MD5 |
00035211a8a2b46973dfbe2bed876d92
|
|
| BLAKE2b-256 |
d560140bf25490dae1e06990f6eafdf356452dbe63c2944df5fba4f73c994273
|