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.5
    hooks:
      - id: ruff-check
      - id: ruff-format
  - repo: https://github.com/Apakottur/unref-pre-commit
    rev: v0.6.1
    hooks:
      - id: unref

See the FAQ for adopting unref in an existing project.

Contributing

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

Metadata

Release files for unref 0.6.1

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.6.1
File Size Uploaded Provenance Actions
unref-0.6.1.tar.gz 303.7 kB Without provenance Details for unref-0.6.1.tar.gz

Built distributions (wheels)

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

Total release size: 21.8 MB

Release files / unref-0.6.1.tar.gz

Download URL unref-0.6.1.tar.gz
Size 303.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ad2a826dc5e15e30519563b2af823381117e0163184ca5ebda07845441d77a3e
BLAKE2b-256 checksum
How to use checksums
75cde534eb87416e7dd1d7871b0fa6b045f03195f3dafa6fc4b0df28c07bc924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-win_arm64.whl

Download URL unref-0.6.1-py3-none-win_arm64.whl
Size 2.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
53e020efb10bc86cbc53388d4212356708002f7031a6b0f72c713b71513c26a3
BLAKE2b-256 checksum
How to use checksums
e76346a89e3fd07655d6a8676454cb47f458fe325088964ac6f8c22e9a81d794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-win_amd64.whl

Download URL unref-0.6.1-py3-none-win_amd64.whl
Size 2.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
9adb9c0f3abff81ebca8c7a386f90060276f02f32a2228122eaa836824799415
BLAKE2b-256 checksum
How to use checksums
5a6cbe510a47f915cd9e053d5ae0830ac0be11b85652b34032b7c60f15e11ed9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.6.1-py3-none-musllinux_1_2_x86_64.whl
Size 2.8 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c72aa61ce2c8c7e19f54726965e87e932e34dfead0546eb921436d8f04196b07
BLAKE2b-256 checksum
How to use checksums
8a4e8df3e0af97e719356ab7d64fc86119301d87acaf88f32778e662909e6898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.6.1-py3-none-musllinux_1_2_aarch64.whl
Size 2.6 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
479a7d3c93b21415ddf5737fb891dd14cbbab8c304a406634eed1b3841f2da72
BLAKE2b-256 checksum
How to use checksums
a66ca7c07ff393b4fd2b615658702c12ca34c82f38d3b9335792d483d125e541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.6.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1ff45d2f2b3743e8d297ea7037b2aac170d9d192c12829d39eed0834d5eac171
BLAKE2b-256 checksum
How to use checksums
9557068e1dc78310d5f02ebe08cb6803120c83cff7c1ddb906333b697d518fee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.6.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
42da29530aa2fee2b488fc799c0fe23f3dbd87d8979f606dba8fbed22636f8c7
BLAKE2b-256 checksum
How to use checksums
58131cbc23104373a1477c06852668f4de53eaa3ed7aa75916db5de2effc4018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.6.1-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
d9e6d8ccf2a5ccce93d0d2616aa793f5bf266a9dc701ed6c26d2fa83ffd6f0f4
BLAKE2b-256 checksum
How to use checksums
af6353e0048a75853290cec14061113b847f8a9c9a4ea873c8edb9db6c1c0d4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.6.1-py3-none-macosx_10_12_x86_64.whl
Size 2.7 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
35a66143d68294081895a6963211d709bb169c0ce64d94ac2b1099c7edb1f3ca
BLAKE2b-256 checksum
How to use checksums
01029d2ab3bbaae3582b49ff6bcac97b2000b61b230adec59f5b085e708428b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.6.1

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