Skip to main content

A simple, dynamic sanity-check library for Python distributions.

Project description

pycheck-tool

PyPI version License: MIT

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 --os for a quick stdlib sweep or --all when you need every package exercised.
  • Friendly CLI aliasespycheck-tool, pycheck, and do_check all 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 the ssl module 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

  1. Work on a feature branch, add tests (use unittest.mock to simulate failures).
  2. Run pytest and pycheck-tool --json before pushing.
  3. Open a PR. Once merged, create a GitHub Release — the publish.yml workflow 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycheck_tool-0.1.2.post1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

pycheck_tool-0.1.2.post1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file pycheck_tool-0.1.2.post1.tar.gz.

File metadata

  • Download URL: pycheck_tool-0.1.2.post1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for pycheck_tool-0.1.2.post1.tar.gz
Algorithm Hash digest
SHA256 7d55962dc2d70fe66b2892ebc899271dc62bee56bafa3fc6a98bfff42d1c6935
MD5 0fe12026afea0070e182ac512da2e657
BLAKE2b-256 d173736798ac3527ab646c0ea3930bfde58f298e36b8add2d1f5ccdc3849df91

See more details on using hashes here.

File details

Details for the file pycheck_tool-0.1.2.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pycheck_tool-0.1.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 79b5e1090a0e4dd8d07cc62b2cba21efbd60a6af106aca71ed1a11b4a5973d96
MD5 631271418f94eb110052ecd0ca08e551
BLAKE2b-256 62b930f31db27125de026d25f22d134ce88fbd709db381d7867f072a86f1161c

See more details on using hashes here.

Supported by

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