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.0
    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.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.6.0
File Size Uploaded Provenance Actions
unref-0.6.0.tar.gz 302.4 kB Without provenance Details for unref-0.6.0.tar.gz

Built distributions (wheels)

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

Total release size: 21.8 MB

Release files / unref-0.6.0.tar.gz

Download URL unref-0.6.0.tar.gz
Size 302.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c0931deaa711e51ccd54d6e50ab88264ea8654a777d4507153f806df8bc6463c
BLAKE2b-256 checksum
How to use checksums
d0f2e9152d183a9d91908b6cef1113f5a81fdde9b925ba8fd746949498672252
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.0-py3-none-win_arm64.whl

Download URL unref-0.6.0-py3-none-win_arm64.whl
Size 2.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
7f149e89c4c2fcbdff591deeac71658405ff6e630a46823b677b7ceec2d71376
BLAKE2b-256 checksum
How to use checksums
ceef07580be53e8b4656486b9ac0b31034b5cc32119b289d15a0d3b189d1d4e5
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.0-py3-none-win_amd64.whl

Download URL unref-0.6.0-py3-none-win_amd64.whl
Size 2.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e6372f161a4e3cbacf5decaf87f2ee112ebb2faa9f12f8fd78b86c0615460905
BLAKE2b-256 checksum
How to use checksums
607e65b7fe88a4c029758d8f95518432dac09ba9687733fb407a1c9e3c141d2e
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.0-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.6.0-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
01ed5e68f37b2770203b65448de83906740540c8e8fe889980baf8974a7601ee
BLAKE2b-256 checksum
How to use checksums
218a3abdae620e6fa77f44ccd1ab0b7aadaae3241674d17345474ff1c4f9d8a9
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.0-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.6.0-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
20e08f63fc763de0f559dcd2fb85e7ac4ef4d1bb6b4fa539a27f1d893f27e5b1
BLAKE2b-256 checksum
How to use checksums
30ea42b150b42a750681670e2eb61428bf9e888f8adf8de3e8f794f974748b87
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.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.6.0-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
d39d5c993f423597a2eb885f57adceb9b41ebf22d11369cf3bd7d2f55c885c6a
BLAKE2b-256 checksum
How to use checksums
df53e28f0e91e107f444a95ab7617e7a1a94200e034c133737293cbd52d905e0
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.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.6.0-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
9df0d9e229e3de07395c5fa3b7dca28c384d33e68a64b3fa2e21d1dddcf67368
BLAKE2b-256 checksum
How to use checksums
1e9b50f00011ba5b7c81fae3460337a0a1773eea5d12b43c0cfbfa381453dcbe
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.0-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.6.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
89cf1d6537fcd988adce3f6ffec9868ec833742a8c30deed1625f17b59416919
BLAKE2b-256 checksum
How to use checksums
68b49913b8da45adf13e25b706ff928c6d16faedf8f62f0998fcc7f5d6e163dd
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.0-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.6.0-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
eb8e1a10358a6892c6c0a025205f872d471866f5dc08a30b3348293772d6926d
BLAKE2b-256 checksum
How to use checksums
89d9ef2ae71cad856a586b1d279bda48f68e0e7be933bc2a9ae8ef3a366b37fe
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.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