Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Threadline — Python code review and data flow visualization

Review Python methods as code: what comes in, what it calls and changes, what it returns — with tests, callers, and models beside it.

PyPI: threadline-review · Get started · Documentation · GitHub · Report a bug

Threadline opens your Python repository in a local browser, or writes it to one HTML file. Choose an endpoint, command, or method to read its code under a one-line summary of its inputs, the project functions it calls, what it changes, and what it returns. Called functions, related tests, callers, and model declarations open beside the code; the call map shows everything it reaches.

It reads source without importing or running the project being reviewed. That project's dependencies do not need to be installed.

Install and open a repository

Requires Python 3.12 or later. In your Python environment:

The PyPI package is threadline-review; the installed command is threadline. Use --pre for the current beta releases.

python -m pip install --pre threadline-review
threadline review /path/to/your/python-project

Your browser opens the review automatically. If it does not, open the local address printed in the terminal. For virtual-environment setup, see the installation guide.

Generate a standalone HTML review

threadline review /path/to/your/python-project --output review.html

This writes a single HTML file, opens it, and exits. It needs no server, internet connection, or Python installation to view. Search, the call map, method code, tests, callers, models, and Git comparisons work from the embedded snapshot. Add --base HEAD to include changes or --no-open to generate the file without opening a browser. Regenerate the file after editing source; omit --output for a local server with Refresh source. The HTML contains the reviewed source, including a baseline when requested. Large exports take longer to prepare and are capped at 256 MiB; use --source-root or --exclude to narrow them, or use the local server for very large codebases.

Read a method

Part What it shows
Summary In, Calls, Changes, Effects, Returns, and Raises. Calls includes methods called on objects passed in, such as db.commit or repository.save. Effects shows database, network, file, process, and logging work, split into reads and writes, including what arrives through called project code ("DB write via update_user"). Select an item to highlight it in the code or open the call. Dashed items are uncertain.
Code Only the selected method. Select a name to highlight every use; underlined calls open beside the code.
Beside the code The opened call, test, or caller with its calling line marked, then Tests, Callers, and Models as source.
Call map Project functions the method reaches, each with the line that calls it and tags such as if, later, or probably.

Open → moves into a method; Back returns with your highlight and side code intact.

Control What it does
☰ (top left) Hides or shows the sidebar to give the code the full width.
Divider between the code and the side pane Drag to resize, or focus it and use the arrow keys; double-click or Enter resets it.
Instructions (bottom right) How to read the review, keyboard shortcuts, and source Coverage.
Theme (top right) Follows the system light or dark setting, or switch to Light or Dark.

The width and theme are remembered in your browser.

Choose where to start

Page How to use it
Endpoints Pick an HTTP verb tab, such as GET or POST, then an endpoint.
Commands & tasks Select a CLI command or background task. Test modules you can run with python -m are folded into their own group.
Modules & methods Pick a module, filter its methods, then select one.

Search is available across all three pages. Each link points to source evidence. Unresolved sources and effects remain visible as gaps rather than invented values. The usage guide explains model references, navigation, and the limits of static data flow.

Review a change

Compare a working tree with a Git baseline:

threadline review /path/to/your/python-project --base HEAD

Open Changes to select a changed method or compare its before/after source. Changed files, rename-only records, and edits outside methods remain visible when no callable body changes. Current callers, historical callers, and possible impact are shown separately. These are direct source relationships, not a complete impact analysis.

For source roots, exclusions, snapshot-pinned JSON queries, and evidence retrieval, see the usage guide.

Understand the limits

Threadline uses static analysis. A call either resolves to one project function, is tagged probably (a likely target), is a library call, or is tagged can't tell (decided at runtime) — supported, possible, external, and unknown in JSON output. Name highlighting matches names within a method; it is not a runtime value trace. Common injected, inherited, and constructed receivers can have possible source candidates. Dynamic dispatch can remain unresolved; the view does not establish what happened at runtime. The header shows analysis problems, and Instructions → Coverage (bottom-right corner) lists parse failures and unmodeled syntax.

This is a beta. Linux and macOS are tested with Python 3.12–3.14; Windows is experimental. Human reviewer sessions remain pending before a stable release.

Contribute

See the contributor guide for development and testing, and the publishing guide for releases.

MIT License · Security policy

Metadata

Release files for threadline-review 0.2.0b5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for threadline-review 0.2.0b5
File Size Uploaded Provenance Actions
threadline_review-0.2.0b5.tar.gz 139.3 kB With provenance Details for threadline_review-0.2.0b5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for threadline-review 0.2.0b5
File Interpreter ABI Platform Actions
threadline_review-0.2.0b5-py3-none-any.whl Python 3 none any Details for threadline_review-0.2.0b5-py3-none-any.whl

Total release size: 286.1 kB

Release files / threadline_review-0.2.0b5.tar.gz

Download URL threadline_review-0.2.0b5.tar.gz
Size 139.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a136de036f5fff230ea4e404d37d1ea73b035cb479208b2ce0b68429b4765ba4
BLAKE2b-256 checksum
How to use checksums
4e17c0547534edf2baac66e1e5c84a3f5b536ad2ca622ab40645d8338889d163
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / threadline_review-0.2.0b5-py3-none-any.whl

Download URL threadline_review-0.2.0b5-py3-none-any.whl
Size 146.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8564468b7c521a0986829a2f24b8af98b8da8c062cc383ea9030cb243ff81274
BLAKE2b-256 checksum
How to use checksums
e5b3aec1913f5f58ed9337cc7a8d3adaa0d210c0c3173b4e3545290ad9cf5c2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Security for threadline-review 0.2.0b5

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for threadline_review-0.2.0b5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page