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.2
    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.2

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.2
File Size Uploaded Provenance Actions
unref-0.6.2.tar.gz 333.0 kB Without provenance Details for unref-0.6.2.tar.gz

Built distributions (wheels)

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

Total release size: 22.6 MB

Release files / unref-0.6.2.tar.gz

Download URL unref-0.6.2.tar.gz
Size 333.0 kB
Tags Source
SHA-256 checksum
How to use checksums
565b9bd0b8c7bb7da48237edc8fbb34482e7edf4dc3d7a5dee35d938bb9ec89b
BLAKE2b-256 checksum
How to use checksums
806cebba2ac46562cc27f38904b18e42c575d1d7b101c9f8d3f4f6aed0d5ee45
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.2-py3-none-win_arm64.whl

Download URL unref-0.6.2-py3-none-win_arm64.whl
Size 2.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
acf31b58ce20254ec5e1dbba852edcf132eabcb9f96a049cf1d2a42fd391fd82
BLAKE2b-256 checksum
How to use checksums
fc4571cfbf00433d9375b7522fc842fc88e69d40c0d2fb115ad59ef3ccde92d7
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.2-py3-none-win_amd64.whl

Download URL unref-0.6.2-py3-none-win_amd64.whl
Size 2.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
080db227d1802cb71fd747d64fbfcdfa35c582df8e2d087d8482928fac25a140
BLAKE2b-256 checksum
How to use checksums
105e98ee0374826bf6325730379a8a08f26565da9e0a847ad760fb17f585ba21
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.2-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.6.2-py3-none-musllinux_1_2_x86_64.whl
Size 2.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
fcfc6810517cce64e1b66f5b2be4d4507d9cd847a25728ace2193454037d583f
BLAKE2b-256 checksum
How to use checksums
4afb7b08c7ca7448abdbe6e58a446053f1ab264a6586423e1d80873a78d61399
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.2-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.6.2-py3-none-musllinux_1_2_aarch64.whl
Size 2.7 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b1070ae04d02ed8de433c85a537ffc2c13b14d37d2c700b8bfd5c2cabe03427e
BLAKE2b-256 checksum
How to use checksums
45609e1c76e6b6ffff1826e6cfacdbe3827817b93095356d101e73bef46fd917
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.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.6.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3514e8f35140d1f866e2cb880012ae2e7ec85ff8aceeb9b1375c17da870c7b42
BLAKE2b-256 checksum
How to use checksums
857451f5b7d725098c0565d39c0901105eaed13f86df3fe0594386af25483d17
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.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.6.2-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
2937d5054f2a8f4b8cb6546915d3844dd136efd438bd91c560c423789b8094df
BLAKE2b-256 checksum
How to use checksums
86849621fce6693018728ee3f8127faf6f02aaaaed79851cf9d753c75b848727
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.2-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.6.2-py3-none-macosx_11_0_arm64.whl
Size 2.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
511ec62497fec05e8ace329d80dec7d7d0cfdad027f6528d1b0781f2f83318f0
BLAKE2b-256 checksum
How to use checksums
d483e5c81f41bdf95fe0290982547df92196df0eda6c53366e452fdc446e076c
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.2-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.6.2-py3-none-macosx_10_12_x86_64.whl
Size 2.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c19497177c5992eae4414a59f9964aa2b58dc7d7bffb46337d298b46f71f16e9
BLAKE2b-256 checksum
How to use checksums
ce9cf63a8d2d3b3509a603461c16b6026c5a0a3f3258c277d122c8e546a1b10a
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.2

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