Skip to main content

image image image image

unref

An extremely fast Python dead code finder, written in Rust.

Time to check CPython with unref and other dead code finders

Checking the whole CPython codebase (v3.15.0, about 2,300 Python files), measured with scripts/benchmark.py.

  • Fast: 20x faster than vulture, it checks all of CPython's Python code in under a second.
  • Just works: built-in rules for pytest, Django, Flask, Pydantic, SQLAlchemy and more, so most projects need little or no configuration.
  • Flexible: works for applications and libraries alike, see what counts as dead code.
  • Modern: follows the conventions of Ruff and ty.
  • Fits your workflow: runs with uvx, as a pre-commit or prek hook, and in GitHub Actions.

Documentation: unref.readthedocs.io

Getting Started

Run it with uvx:

$ uvx unref
src/project/models.py:12:7: unused-class 'Account'
src/project/utils.py:40:5: unused-function 'parse_date'

Or as a pre-commit or prek hook, alongside Ruff:

repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.17.4
    hooks:
      - id: ruff-check
      - id: ruff-format
  - repo: https://github.com/Apakottur/unref
    rev: v0.4.0
    hooks:
      - id: unref

Contributing

Bug reports and other feedback are welcome as issues. To contribute, see CONTRIBUTING.md.

Metadata

Release files for unref 0.4.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 unref 0.4.0
File Size Uploaded Provenance Actions
unref-0.4.0.tar.gz 254.8 kB Without provenance Details for unref-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for unref 0.4.0
File Actions
unref-0.4.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for unref-0.4.0-py3-none-win_arm64.whl
unref-0.4.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for unref-0.4.0-py3-none-win_amd64.whl
unref-0.4.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for unref-0.4.0-py3-none-musllinux_1_2_x86_64.whl
unref-0.4.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for unref-0.4.0-py3-none-musllinux_1_2_aarch64.whl
unref-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for unref-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
unref-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for unref-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
unref-0.4.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for unref-0.4.0-py3-none-macosx_11_0_arm64.whl
unref-0.4.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for unref-0.4.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 21.0 MB

Release files / unref-0.4.0.tar.gz

Download URL unref-0.4.0.tar.gz
Size 254.8 kB
Tags Source
SHA-256 checksum
How to use checksums
78563917ef775ca8060d61628dd96f736fa0ca68df46623d006ede594febdd22
BLAKE2b-256 checksum
How to use checksums
8658449ac2f03c75d784c6fdaaf9c6ce0d93b58e85bb26f2d41a97eef205620c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-win_arm64.whl

Download URL unref-0.4.0-py3-none-win_arm64.whl
Size 2.5 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
eb7b7881a3330ab3a4800b71f253dc2bcd64d324296794ecd22ed06530cb9167
BLAKE2b-256 checksum
How to use checksums
e9053db81b2a5ed8b3934e7b4e6281e18b7337b9c87b7b298f7e5cc645d1e37d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-win_amd64.whl

Download URL unref-0.4.0-py3-none-win_amd64.whl
Size 2.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
bfc7ef7a119ca90b8ef33efaffbc5714c97e53a81157da3da0feddc492a4ec36
BLAKE2b-256 checksum
How to use checksums
4e13f9e09346da22316131d3a9f546b18f38b5df82cb29e74ebc1b6870fdeae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.4.0-py3-none-musllinux_1_2_x86_64.whl
Size 2.7 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
62ec3c09cbfc403aa1191b073c9472ef7b0ecf4fbdb4eacdca7d39fa6bd6f9f8
BLAKE2b-256 checksum
How to use checksums
be07261c315a80e98815649f6c07fdefa5119b6b8ec7f9b0a15f5d20d03524e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.4.0-py3-none-musllinux_1_2_aarch64.whl
Size 2.5 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
27928656091bb133e91eac0bfc50c76a86c0cdd54902bea8c8f102b150a785d9
BLAKE2b-256 checksum
How to use checksums
49486264025bad05f19f693c92a8b9b58555771e515b30f7c83fc252a043c856
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.6 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
db4e3b952440e41a6e3eb6ced75ace6202726f04afd5332f7d6acf1e7b2b460c
BLAKE2b-256 checksum
How to use checksums
63e02db8783cf1a2abadd489feb89e8c29229532e8cb7ede83535db032600f70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
83ff2bd056266a5901c84328eade7498b7b5a2d3cbe114abe1667940733572b1
BLAKE2b-256 checksum
How to use checksums
1a8264059a231e59784e54337c04b8f32956b75f4c43843b8b5e43149adc890f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.4.0-py3-none-macosx_11_0_arm64.whl
Size 2.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
de337856bba802fd5fccc723c923dd1467dc7edfd616784d6f2ef94d1335a3d2
BLAKE2b-256 checksum
How to use checksums
16a6cc7b4f8e47b8dddda5d4aeca30578ae1cb2f49f865a677bfb54c73c2eba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / unref-0.4.0-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.4.0-py3-none-macosx_10_12_x86_64.whl
Size 2.6 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5e4f956a8e2874fd4cdf71cff76263550ca88d6b9562b929611eb7a168cb303d
BLAKE2b-256 checksum
How to use checksums
3cae1cb3829f00c95de25ab322d4cff4cad6203c9dfdba03ec60ecc511d7fe0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for unref 0.4.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.

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