Skip to main content

Skarmory

PyPI version CI Python SDK supports CPython 3.11+ CLI builds with Rust 1.98+ MIT license

Find unreachable functions in Python projects with a native Rust analyzer.

Skarmory 0.1.0 ships a dead-code preview for packaged Python 3.11 projects. Choose the source roots and entry points of an application or the public API of a library. The native CLI and Python SDK use the same engine and return the same versioned report, with findings, reachability evidence, uncertainty, and coverage. See the 0.1.0 release notes.

Install

Install the Python SDK in a virtual environment. Wheels support standard CPython 3.11+ on x86-64 and ARM64 for Linux (glibc and musl), macOS, and Windows. A source distribution is also available.

python -m pip install "skarmory==0.1.0"

Install the native CLI with Rust 1.98 or newer. The installed executable runs independently of Python.

cargo install --locked --version 0.1.0 skarmory_cli
skarmory --version

Quick start

Run this from the root of a project with a package entry at src/example/main.py.

skarmory . --source-root src --entry-module example.main

The Python SDK accepts the same source root and entry.

import skarmory

report = skarmory.analyze(
    ".",
    source_roots=["src"],
    entry_modules=["example.main"],
)

coverage = report["coverage"]
if coverage["status"] == "complete":
    for finding in report["findings"]:
        print(finding["path"], finding["line"], finding["symbol"])
else:
    print(coverage["issues"])

For a library, declare the callables that external users can reach. You can also declare public modules with resolvable literal __all__ lists.

skarmory . --source-root src --policy library --public-callable example:open_file

Read the report

  • Findings identify functions with no reachable path from the declared entries or exports in a complete scan.
  • Evidence and uncertainty explain why definitions were retained and flag functions that may be used.
  • Coverage records analyzed sources and reports reasons the scan could not finish, including required imports outside the selected sources, unsupported syntax, and exceeded analysis limits.

The CLI writes JSON to stdout. It exits 0 for a complete scan, including scans with findings. Exit 2 signals incomplete analysis or an invocation or output error. The SDK exposes completeness through coverage.status.

The 0.1.0 preview implements one rule, unreachable_function, within a closed set of Python 3.11 sources. See the scan contract for supported syntax, import resolution, and scan limits. The Skylos 5.7.0 comparison records the two fixtures checked against the pinned baseline.

Development

Use Python 3.11 or newer. The repository pins Rust 1.98.1 with rustfmt and clippy. Run the CLI from source and install the development SDK in a virtual environment.

cargo run --locked -p skarmory_cli -- tests/conformance/fixtures/reachable
python -m pip install .

Checks

python scripts/check_structure.py
cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo test --locked --workspace
cargo build --locked -p skarmory_cli
python tests/conformance/check_phase0.py target/debug/skarmory
python tests/conformance/check_phase01.py target/debug/skarmory
python -m unittest discover -s tests/python -v

Run the Python tests after installing the SDK. On POSIX, verify the source-only error path separately.

PYTHONPATH=python python -m unittest discover -s tests/python -v

Project documentation

Metadata

Release files for skarmory 0.1.0

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

Source distribution (sdist)

Source distribution for skarmory 0.1.0
File Size Uploaded Provenance Actions
skarmory-0.1.0.tar.gz 168.2 kB Without provenance Details for skarmory-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for skarmory 0.1.0
File Actions
skarmory-0.1.0-cp311-abi3-win_arm64.whl CPython 3.11 abi3 Windows ARM64 Details for skarmory-0.1.0-cp311-abi3-win_arm64.whl
skarmory-0.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for skarmory-0.1.0-cp311-abi3-win_amd64.whl
skarmory-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for skarmory-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl
skarmory-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for skarmory-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl
skarmory-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for skarmory-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
skarmory-0.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for skarmory-0.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
skarmory-0.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for skarmory-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
skarmory-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for skarmory-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 10.5 MB

Release files / skarmory-0.1.0.tar.gz

Download URL skarmory-0.1.0.tar.gz
Size 168.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a3dfb90f5c5c63143009f7e6fef7748e3e89a2c181e837efd51bd7f2af5e7712
BLAKE2b-256 checksum
How to use checksums
ea678b6b23917afb1f43abebae6caa9059702b9b9dc2ca6c185b6c499408f810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-win_arm64.whl

Download URL skarmory-0.1.0-cp311-abi3-win_arm64.whl
Size 1.2 MB
Tags CPython 3.11 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
2ee14c6abe54d6743a52db6780b6f71cea75d6f6063eb3d7c236a7e37763590c
BLAKE2b-256 checksum
How to use checksums
32a68578373825a95229bb81e4e111ba0f5f650ef78b2cdb915cf4df7f8ee3dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-win_amd64.whl

Download URL skarmory-0.1.0-cp311-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
af19ff377d4e6f3922e6591aaa89648df1c06e5c963d2fa9232240d065a82611
BLAKE2b-256 checksum
How to use checksums
e5a1c58b3a8973a031bed6e0fdcd4af156446e03de374f46989f9975952d7ce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL skarmory-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 1.3 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
f20ff384f89e41f679083e979d77f293bf1a54ce139ff66eb960c92503fa45ee
BLAKE2b-256 checksum
How to use checksums
7e61a11f48e57e3388113cc67c0cac762a506f4fc6073c6430b93c9c634cc6d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL skarmory-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl
Size 1.3 MB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
3816d32ae8d6f6410d9819fca355129ca5611a5397bba4b94a690263d63e498a
BLAKE2b-256 checksum
How to use checksums
747e26d85e54cceb28ae5fd27571dcfdc9692ddda0194992af1e3b9c1260fa79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL skarmory-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
898ef0d3cbe7650f6e075224c7e76c1a986ec195873f006441b708284126e891
BLAKE2b-256 checksum
How to use checksums
88011c30cdca491cbe103882efa458a5e9b840f6d466848c152fffc63e0fa115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL skarmory-0.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ef8bdbb7c2ad57b90c009d6a38ecdf07fe170d48f4d7c6407813142033b2fedb
BLAKE2b-256 checksum
How to use checksums
7671cfcf12fc593e3ee8ea6a25a19ee587fd70d51044cf42385fd526b19e0e16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL skarmory-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
da3156858afc838d79a2cec229c4aad17734ea8b96eeb3b0d933fbc553110988
BLAKE2b-256 checksum
How to use checksums
127e7aeb6deb45756b4f4cda69e9431b85cc6f2fd1d661eea4073daae7f9e9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Release files / skarmory-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL skarmory-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.3 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
90fb18f135f5a4e817ff27b617c5d18e4d67a7578887859e877a737c1e1fdc26
BLAKE2b-256 checksum
How to use checksums
f04f98311efd320fb80ff71e2b08d6f736a321a75fb72c9f4898528bf1b251f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.18

Security for skarmory 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

9 release files No provenance

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