Skip to main content

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 blocks envdoctor as too similar to an existing project), but the installed command and the importable package are both still envdoctor.

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

arun_envdoctor-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

arun_envdoctor-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for arun_envdoctor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 20a1b552ff7a79d8be68ebd8588feb6d74b526a9d8bd039920f74f438d1e35db
MD5 3932092a30126fcd7a76346d3ec7645c
BLAKE2b-256 576006dd62199ac3b4ada46186e07a58c4fbcbe0d996ea5157269103c053e705

See more details on using hashes here.

Provenance

The following attestation bundles were made for arun_envdoctor-0.1.0.tar.gz:

Publisher: python-release.yml on arun-skg/envdoctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for arun_envdoctor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 613804aca1d91c669b18cfa3e52372f58ed89007196500ac2c937e680d6f04b9
MD5 2e0d16dd6837586fb65e0b98a946e146
BLAKE2b-256 39749a3d0a721e46121ef107b42d1635524b3d0ee2157d301279d46a3edec950

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Supported by

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