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.5.1
    hooks:
      - id: unref

Contributing

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

Metadata

Release files for unref 0.5.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.5.1
File Size Uploaded Provenance Actions
unref-0.5.1.tar.gz 283.9 kB Without provenance Details for unref-0.5.1.tar.gz

Built distributions (wheels)

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

Total release size: 21.4 MB

Release files / unref-0.5.1.tar.gz

Download URL unref-0.5.1.tar.gz
Size 283.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3ace1f0d6633b8baed5b8caf6b0a49d7b98d3260cdb4b9a6bc696d6c95a57333
BLAKE2b-256 checksum
How to use checksums
4d7c6d4386be04954bd49cd19644584d698e40e50d89467bc981a18f96343b90
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.5.1-py3-none-win_arm64.whl

Download URL unref-0.5.1-py3-none-win_arm64.whl
Size 2.6 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
06e18da71aaeff85d43ed5f9cd9b0a7a02ed323a2bfb0dd78de7f8b788474bfa
BLAKE2b-256 checksum
How to use checksums
f0c79dee4a8821535dddba9411f85d3cf1d6ce4db02d07d0a2caff86efae14cf
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.5.1-py3-none-win_amd64.whl

Download URL unref-0.5.1-py3-none-win_amd64.whl
Size 2.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2a8359844ab0311173d5863e9f041ac6683efd756ba828f362c012d2f7329787
BLAKE2b-256 checksum
How to use checksums
766e168ac8cb74b09ef645a5b3d6837b1464ac08611463ea9942e3c6a22eda68
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.5.1-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.5.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
569e0fd48ecaeef249a0f237e2c11605b20c3356a47104eab7a9fa9ffcd1dd32
BLAKE2b-256 checksum
How to use checksums
51f437da2014b51ce8aa37770cc9506dfec7215509f2c7c3b4895b6ac082e0a6
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.5.1-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.5.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
7da47cd668c78339f76edfecf74a70d6db2785c774c3f1aaff99e16ce8a8a6ce
BLAKE2b-256 checksum
How to use checksums
8e356d8befce31982c75b6d01ec3fb65cd1afb9e723c2368c640395c659cb4f4
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.5.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.5.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
800bae7b729c29e2494dd849a8008f141c5ade0c2322d75fdc74ce50785d1aa7
BLAKE2b-256 checksum
How to use checksums
4c69069ac9fc8faee7455d7494015fd7f6f9e879ca9dcee740b3a9003c155cd8
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.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.5.1-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
015fdef72e1962655939aaebc4515bb1c46a5a7abceacb0b3f93ad697171a6c8
BLAKE2b-256 checksum
How to use checksums
b56f2532bb9bf8170700a6b3d1b2b2aa72204a4b3381f83a73db37252bbaedfa
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.5.1-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.5.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
e237b40071384e10d20b0eaec70236fc938291fc52b25d39d5f2406689b4936a
BLAKE2b-256 checksum
How to use checksums
521568ca987d5db083f2278f8bc4e3ca27cc109f9f3f1cc89e386f8e06456457
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.5.1-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.5.1-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
be1a43459eb88b399e26e5d2db237f2e9171d9bbc7869bdc4181ec2320acaf0a
BLAKE2b-256 checksum
How to use checksums
c9ba40e6aa86a538ffc7a0497b5afb0f95d0cbf230bd8868105c8a0453f20f5a
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.5.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