Skip to main content

Visualise Python project type completeness

Project description

Generate a treemap graph from Pyright verifytypes output.

PyPI version License Python versions supported Built with uv Checked with Ruff Checked with Pyright Python checks Coverage

A simple cli tool to visualise the state of a Python project's type completeness, from the output of pyright's --outputjson --verifytypes command:

Sample graph output for prefect

The interactive graph depicts a projects modules as a tree, with each the size of each module based on the number of exported symbols.

Usage

Use a Python tool manager like uv tool or pipx:

$ uv tool install pyright
$ uv tool install pyright-analysis

Then generate a type completeness JSON report for your package, and transform the report into a graph:

$ pyright --outputjson --ignoreexternal --verifytypes PACKAGE > PACKAGE.json
$ pyright-analysis PACKAGE.json

This will open the resulting graph in your browser.

Full help documentation is available on the command-line:

pyright-analysis help output

Features

  • Interactive responsive graph. Hover over each package to get more detail about symbol counts and completeness, or click on packages to zoom in.
  • Export options:
    • Full stand-alone HTML page.
    • HTML div snippet with configurable HTML id.
    • Static image export as PNG, JPG, WebP, SVG or PDF.
    • Plotly JSON graph representation.

GitHub Action

You can generate visualiations for your own projects in your GitHub workflow by using the pyright-analysis-action action.

Development

This project uses uv to handle Python dependencies and environments; use uv sync to get an up-to-date virtualenv with all dependencies. This includes development dependencies such as Ruff (used for linting and formatting) and Pyright (used to validate type annotations).

Linting and formatting

While PRs and commits on GitHub are checked for linting and formatting issues, it's easier to check for issues locally first. After running uv sync, run uv run pre-commit install to install pre-commit hooks that will run these tools and format your changes automatically on commits. These hooks also run uv sync whenever you working tree changes.

Testing

This project uses pytest to run its tests: uv run pytest.

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

pyright_analysis-1.0.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

pyright_analysis-1.0.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pyright_analysis-1.0.0.tar.gz.

File metadata

  • Download URL: pyright_analysis-1.0.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyright_analysis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1d76fe897bb6c9f7cd26d09b51a68013ab74b0f33862bdb0ad43c0f46f423f92
MD5 add9f9f807a6b2745d7bc41583c64f5e
BLAKE2b-256 6043fd39aeddd38849b9a0ee45f1614009aff926100dd26ccd30324cfbfef5de

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyright_analysis-1.0.0.tar.gz:

Publisher: ci-cd.yml on mjpieters/pyright-analysis

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

File details

Details for the file pyright_analysis-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyright_analysis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eabe1123c954c0528eb37fc16afd1095376f6152b7685fc7bf67c8975ad536b0
MD5 7ae0751057f16a3d50b88aad9f534bcc
BLAKE2b-256 b82311fc129e1e91a74bb7ce63c25078f23a339f42bfd8e3632b2b1ba313262e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyright_analysis-1.0.0-py3-none-any.whl:

Publisher: ci-cd.yml on mjpieters/pyright-analysis

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