pycheck-tool
pycheck-tool is the safe, zero-dependency way to answer "Is this Python install healthy?" — whether you're a beginner sharing logs or a maintainer shipping CI.
At a Glance
| Current version | 0.1.4 |
| Python support | 3.9 – 3.13 |
| License | MIT |
| Maintainer | Aubrey |
| Status | Battle-tested and production-ready |
Features
- No dependencies – works anywhere Python does.
- Two-tier checks – run
--osfor a quick stdlib sweep or--allwhen you need every package exercised. - Friendly CLI aliases –
pycheck-tool,pycheck, anddo_checkall point to the same entry point. - JSON with the Dutcho filter – usernames and home paths are scrubbed automatically, so you can paste logs without leaking
/Users/you. - Capability probes – built-in filesystem + SSL diagnostics with clear pass/fail status codes.
- Hostile environment resilience – survives corrupted
sys.modules, broken imports, and malformed distributions without crashing. - Debug diagnostics – use
--debugto see which modules failed to import. - Spam protection – use
--limit Nto cap output when checking many packages. - Release automation – published via Trusted Publishing as soon as you cut a GitHub Release.
Quick Start
Option A – use it
pip install pycheck-tool
# Minimal health check (runs --os by default)
pycheck-tool
You can also get it via curl, by typing:
curl -fsSL https://raw.githubusercontent.com/Auberryy/pycheck/main/pycheck_tool.py | python3 -
Option B – hack on it
git clone https://github.com/Auberryy/pycheck.git
cd pycheck
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .[dev]
pytest
Command cheat sheet
| When you need… | Run |
|---|---|
| Fast confidence in stdlib modules | pycheck --os |
| Exhaustive audit of installed packages | pycheck --all |
| Shareable JSON (sanitized) | pycheck --json > report.json |
| Human + JSON in one go | pycheck --os --json |
| Debug failing imports | pycheck --os --debug |
| Limit output spam | pycheck --all --limit 10 |
| Backwards-compatible names | pycheck-tool or do_check |
JSON reports & the Dutcho filter
--json emits machine-friendly output (perfect for Neovim, editors, CI). Before printing, every string is sanitized:
- Home directory prefixes become
~. - Usernames are replaced with
<user>. - Capability entries (filesystem, SSL) share the exact status you can copy/paste online.
pycheck --json > reports\health.json
# Safe to share: no absolute paths or usernames leaked
Python API
import pycheck
# Quick stdlib check
if pycheck.doSanityCheck(pycheck.OS):
print("OS Library is good")
# Full package audit
result = pycheck.doSanityCheck(pycheck.ALL)
if result:
print(f"{result} libraries are fine!")
# Get list of failed imports for diagnostics
failed = pycheck.get_failed_imports(pycheck.OS)
if failed:
print(f"Failed to import: {failed}")
# Check specific capabilities
ssl_result = pycheck.check_ssl_support()
fs_result = pycheck.check_filesystem_access()
Use the API when you want to embed health checks into your own tooling or CI scripts.
Capability probes
Each run appends capability entries to the report:
filesystem_access– verifies we can write/read a temp file.ssl– ensures thesslmodule imports and can create a default context.
Failures cause a non-zero exit code so CI can gate on them.
Robustness
pycheck is designed to survive hostile environments:
- Corrupted sys.modules – handles
None, integers, or broken objects where modules should be. - Broken distributions – gracefully skips packages with corrupted metadata.
- Import side effects – catches exceptions from packages that crash during import.
- Ctrl+C support – properly propagates
KeyboardInterruptandSystemExit.
Development & release flow
- Work on a feature branch, add tests (use
unittest.mockto simulate failures). - Run
pytestandpycheck --jsonbefore pushing. - Open a PR. Once merged, create a GitHub Release — the
publish.ymlworkflow builds and uploads to PyPI with trusted publishing (no tokens to copy).
See CONTRIBUTING.md for full guidelines, including the "Zero Dependencies Forever" rule.
Project layout
src/pycheck/
├── __init__.py # Package exports and version
├── checker.py # Core sanity-check logic
├── cli.py # CLI entry point and argument parsing
└── utils.py # Sanitization helpers
tests/ # pytest suite with mocked failure scenarios
examples/ # Tiny runnable snippets
pycheck_tool.py # Standalone single-file version
Metadata
Release files for pycheck-tool 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycheck_tool-0.1.4.tar.gz | 15.4 kB | Without provenance | Details for pycheck_tool-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycheck_tool-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for pycheck_tool-0.1.4-py3-none-any.whl |
Total release size: 27.3 kB
Release files / pycheck_tool-0.1.4.tar.gz
| Download URL | pycheck_tool-0.1.4.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55b6a6dfb95c8d603434b790cb6949a6237d119ce23fb12125f333660d7ac85f
|
|
BLAKE2b-256 checksum How to use checksums |
524d2b4f6c48888750d6171d0b7342f54dc3e186fb9b4f1e95467ab7a5e2818f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / pycheck_tool-0.1.4-py3-none-any.whl
| Download URL | pycheck_tool-0.1.4-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fe7ee8b8843b4b7c55fd35f78535bb2d40cf9f5bbe5877c31af07d08855e15c
|
|
BLAKE2b-256 checksum How to use checksums |
81110d13d94a0f30db4c510605757f07a0387d57d27f0f656d46b03b44b37734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Security for pycheck-tool 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.