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
Release files for dotcompare 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dotcompare-0.1.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dotcompare-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / dotcompare-0.1.0.tar.gz
| Download URL | dotcompare-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27b20fd3f17536657017635f17e5818747787e45edea1e9fb432a72e1b469ef6
|
|
BLAKE2b-256 checksum How to use checksums |
ef7383fbe967af9cfcafa020569d839f7b1d7e3f6fbbad533f9f9a4d86aacef5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / dotcompare-0.1.0-py3-none-any.whl
| Download URL | dotcompare-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68699246ffbd89305a02b0e3c42d00f507bab2363e25b27e69321741378ae606
|
|
BLAKE2b-256 checksum How to use checksums |
d560140bf25490dae1e06990f6eafdf356452dbe63c2944df5fba4f73c994273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|