Skip to main content

Python source scanner for Total.Recall — emits canonical JSONL records consumed by the Total.Recall MCP server.

Project description

total-recall-scan-py

Python source scanner for Total.Recall. Walks a Python codebase, parses each file with ast, and emits the canonical JSONL records consumed by the Total.Recall MCP server.

This is one of three scanners in the Total.Recall ecosystem:

Language Package Entry point
.NET NuGet TotalRecall.Mcp total-recall scan
Python PyPI total-recall-scan-py (this package) total-recall-py
TypeScript npm @total-recall/scan (planned) total-recall-ts

All three produce identical schema-shaped JSONL — the Total.Recall MCP server is language-agnostic and reads whatever lands in data/<namespace>/. See docs/SCANNER_SCHEMA.md for the contract.

Install

pipx install total-recall-scan-py
# or
uv tool install total-recall-scan-py

Usage

total-recall-py scan \
  --source-root src \
  --coverage coverage.xml \
  --tests tests \
  --namespace myproject \
  --output /path/to/Total.Recall/data

Inputs:

  • --source-root — directory containing your production Python source.
  • --coverage (optional) — path to a Cobertura XML file (coverage.py emits this with coverage xml).
  • --tests (optional) — directory containing pytest test files.
  • --namespace — namespace subdirectory under data/.
  • --output — root data directory (matches TOTAL_RECALL_DATA env var used by the MCP server).

Outputs in <output>/<namespace>/:

  • type-registry.jsonl — every public class / function / dataclass / Protocol / ABC.
  • coverage-gaps.jsonl — uncovered lines per class (when --coverage is supplied).
  • test-inventory.jsonl — pytest test methods by class under test (when --tests is supplied).
  • config.json — persisted scan inputs for total-recall doctor.

Schema

This scanner emits records conforming to schemaVersion: 1. The lang discriminator on every type-registry.jsonl record is python, with these extension fields:

{ "kind": "python", "isDataclass": true, "isFrozen": false,
  "isAbc": false, "isProtocol": false, "decorators": ["@dataclass"] }

Development

git clone https://github.com/monk-eee/Total.Recall.MCP
cd Total.Recall.MCP/src/Total.Recall.Scanners.Python
python -m venv .venv
.venv\Scripts\activate    # Windows
# source .venv/bin/activate  # macOS / Linux
pip install -e ".[dev]"
pytest

License

MIT — see LICENSE at the repo root.

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

total_recall_scan_py-0.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

total_recall_scan_py-0.1.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file total_recall_scan_py-0.1.0.tar.gz.

File metadata

  • Download URL: total_recall_scan_py-0.1.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for total_recall_scan_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a1cfdb272e489f989acb9be487a4b34186e3e9b00eb58ee0bb52ab9d66af0bd
MD5 89681cf6bc8bcb3ad55ddaa80f419309
BLAKE2b-256 c30a8c158f222c66d36697188991fdcb4a14165a1ba53c49b22bb1b9e605c61b

See more details on using hashes here.

Provenance

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

Publisher: publish-python-scanner.yml on monk-eee/Total.Recall.MCP

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

File details

Details for the file total_recall_scan_py-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for total_recall_scan_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a983cba4690931c25517476cd346a5297a9a241819aaedccbd756b680a57f96
MD5 157d0efc2b95568ec68ec36825a273c0
BLAKE2b-256 d9261ffd2855586f75a3cd630af218940ea7fb6dd7c4dc6d9e47c8971d162576

See more details on using hashes here.

Provenance

The following attestation bundles were made for total_recall_scan_py-0.1.0-py3-none-any.whl:

Publisher: publish-python-scanner.yml on monk-eee/Total.Recall.MCP

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

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