envdoctor (Python)
Native Python port of envdoctor — a local-first consistency checker for environment variables, distributed on PyPI so Python projects can use it without Node.
pip install arun-envdoctor
envdoctor scan --dir .
The PyPI distribution is named
arun-envdoctor(PyPI blocksenvdoctoras too similar to an existing project), but the installed command and the importable package are both stillenvdoctor.
What it does
Reconciles the environment variables used in your Python source
(os.getenv("X"), os.environ.get("X"), os.environ["X"], and the
from os import environ forms) against those defined in your .env files,
then reports:
| Rule | Severity | Meaning |
|---|---|---|
undefined-in-source |
error | Used in code but not defined in any .env file |
unused |
warning | Defined in .env but never referenced in source |
Comments and docstrings are stripped before scanning, so documented examples don't cause false positives. Nothing is uploaded and variable values are never printed.
envdoctor scan exits 1 when there are errors (or with --strict, warnings),
making it CI-friendly.
Library use
from pathlib import Path
from envdoctor import scan
result = scan(Path("."))
for finding in result.errors:
print(finding.name, finding.message)
Development
pip install -e ".[dev]" pytest
pytest
This package is one of several native, per-ecosystem ports; the reference implementation and full detector suite live in the main repository.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 arun_envdoctor-0.1.0.tar.gz.
File metadata
- Download URL: arun_envdoctor-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a1b552ff7a79d8be68ebd8588feb6d74b526a9d8bd039920f74f438d1e35db
|
|
| MD5 |
3932092a30126fcd7a76346d3ec7645c
|
|
| BLAKE2b-256 |
576006dd62199ac3b4ada46186e07a58c4fbcbe0d996ea5157269103c053e705
|
Provenance
The following attestation bundles were made for arun_envdoctor-0.1.0.tar.gz:
Publisher:
python-release.yml on arun-skg/envdoctor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arun_envdoctor-0.1.0.tar.gz -
Subject digest:
20a1b552ff7a79d8be68ebd8588feb6d74b526a9d8bd039920f74f438d1e35db - Sigstore transparency entry: 2565717830
- Sigstore integration time:
-
Permalink:
arun-skg/envdoctor@b40b1d8debf812e3aed2343ffbb7cff9209e6771 -
Branch / Tag:
refs/tags/python-v0.1.0 - Owner: https://github.com/arun-skg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@b40b1d8debf812e3aed2343ffbb7cff9209e6771 -
Trigger Event:
push
-
Statement type:
File details
Details for the file arun_envdoctor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arun_envdoctor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
613804aca1d91c669b18cfa3e52372f58ed89007196500ac2c937e680d6f04b9
|
|
| MD5 |
2e0d16dd6837586fb65e0b98a946e146
|
|
| BLAKE2b-256 |
39749a3d0a721e46121ef107b42d1635524b3d0ee2157d301279d46a3edec950
|
Provenance
The following attestation bundles were made for arun_envdoctor-0.1.0-py3-none-any.whl:
Publisher:
python-release.yml on arun-skg/envdoctor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arun_envdoctor-0.1.0-py3-none-any.whl -
Subject digest:
613804aca1d91c669b18cfa3e52372f58ed89007196500ac2c937e680d6f04b9 - Sigstore transparency entry: 2565717909
- Sigstore integration time:
-
Permalink:
arun-skg/envdoctor@b40b1d8debf812e3aed2343ffbb7cff9209e6771 -
Branch / Tag:
refs/tags/python-v0.1.0 - Owner: https://github.com/arun-skg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@b40b1d8debf812e3aed2343ffbb7cff9209e6771 -
Trigger Event:
push
-
Statement type: