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

Contributing

False positives and other bugs are welcome as issues. To contribute code, see CONTRIBUTING.md.

Metadata

Release files for unref 0.3.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.3.2
File Size Uploaded Provenance Actions
unref-0.3.2.tar.gz 245.8 kB Without provenance Details for unref-0.3.2.tar.gz

Built distributions (wheels)

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

Total release size: 20.8 MB

Release files / unref-0.3.2.tar.gz

Download URL unref-0.3.2.tar.gz
Size 245.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ee672984f345c6a2eebb95617975f3b306444c1cb851db6723533e92292dd607
BLAKE2b-256 checksum
How to use checksums
5d394321eac8e96f7cc361ace4ae532d036b6c0723ac988bc2cc65b22b17f949
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.3.2-py3-none-win_arm64.whl

Download URL unref-0.3.2-py3-none-win_arm64.whl
Size 2.5 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
ce67d4300858cf9e534a1ca3190fec07e554a9482eedb48b621dba076b3ed89f
BLAKE2b-256 checksum
How to use checksums
4b065d211c0aae16349fe9b29dd0d300bf968e1d4194c82509c28f07edd144c1
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.3.2-py3-none-win_amd64.whl

Download URL unref-0.3.2-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
20ceee36b5370123ca0baec40ba9d37e32736753a7ffc26b9ec3c1ca1ba37105
BLAKE2b-256 checksum
How to use checksums
175d5e3605ea94a727979ce64a5270ac39480f9d45c2ec5d6edc5d92b9b13cc9
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.3.2-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.3.2-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
f5232d3851347c0aa1240b4be81c5fbc6fd94717e3b7b83474f5bffbfbe3a71d
BLAKE2b-256 checksum
How to use checksums
081f1579789e9c527ce0ed759bbec9e566cea27ea8618ac86184c39226bf460d
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.3.2-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.3.2-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
4bc1fd3ef6f912a15f02dfa16f935bd6168cdff101ba032e2869988ac7df0fd3
BLAKE2b-256 checksum
How to use checksums
e9bf006c0d64a3ea82d6e6b673ff69ce38c08512bcd71df66ca45079a1e34921
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.3.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.3.2-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
0a21f1cf73d834a05b41ace840d0d7c9ae67e7ebf801781480a0d01e7135cee9
BLAKE2b-256 checksum
How to use checksums
4431b9e8a8ab747b7aa73c736621f020db34b1d9a0b63878ed43a449aa9fc8c8
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.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.3.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
65d893fb63aa1af27a2d079c9e20892273ed4a541f971a033ddeaa8dd1f62003
BLAKE2b-256 checksum
How to use checksums
67815dbf4518ad7ddb200c06f253b2b2a285b2772beb9d77475c7ae17a2e2d75
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.3.2-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.3.2-py3-none-macosx_11_0_arm64.whl
Size 2.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7d427050d313032c97236dc2bcf09aaba671410103d9235ec8976a15efa93550
BLAKE2b-256 checksum
How to use checksums
c87290778b5f74a1fc569a003d5803dc9ba923681a991f95108cc15ac10ef3ce
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.3.2-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.3.2-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
739e91b9ea81430b7e6950234cb043265b90ad7a95dc47fe7b305ec0ba49a107
BLAKE2b-256 checksum
How to use checksums
fe6fc26e04c5bac0b06d6a8b8a8e4eb8b3c9742d8aa4ed7b38844b24cbe9ec8c
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.3.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