A simple, dynamic sanity-check library for Python distributions.
Project description
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.2 |
| Python support | 3.9 – 3.13 |
| License | MIT |
| Maintainer | Aubrey |
| Status | Reference implementation in incubation |
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.
- 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
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-tool --os |
| Exhaustive audit of installed packages | pycheck-tool --all |
| Shareable JSON (sanitized) | pycheck-tool --json > report.json |
| Human + JSON in one go | pycheck-tool --os --json |
| Backwards-compatible names | pycheck 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-tool --json > reports\health.json
# Safe to share: no absolute paths or usernames leaked
Python API
import pycheck_tool as pycheck
if pycheck.doSanityCheck(pycheck.OS):
print("OS Library is good")
result = pycheck.doSanityCheck(pycheck.ALL)
if result:
print(result + " Libraries are fine!")
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 (mocked in tests).
Failures cause a non-zero exit code so CI can gate on them.
Development & release flow
- Work on a feature branch, add tests (use
unittest.mockto simulate failures). - Run
pytestandpycheck-tool --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_tool.py– core logic + CLI.src/utils.py– sanitization helpers shared by reports/tests.tests/– pytest suite with mocked failure scenarios.examples/– tiny runnable snippets.
Project details
Release history Release notifications | RSS feed
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 pycheck_tool-0.1.2.tar.gz.
File metadata
- Download URL: pycheck_tool-0.1.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60889d3e3593572795ba252cfeca7acaba9a4ad4f9cce47c4c7a80dcf60af40
|
|
| MD5 |
4a2404492ef96641f6bf4a1704239dd8
|
|
| BLAKE2b-256 |
2b5ac7ca913cf5fa9a8fb8989026b71e875e80dae198ae0e5fc69e0201522cac
|
File details
Details for the file pycheck_tool-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pycheck_tool-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61a033341110c078e247b9323f433bed17a06c925cfcff573526e76c7d999871
|
|
| MD5 |
54558afb99c0cf1e8d48cac5491c233f
|
|
| BLAKE2b-256 |
ead1a7e01a905ed5c46f0225f6260c06f54d72af6108fbf0f7902664005b2392
|