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.0
    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.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.5.0
File Size Uploaded Provenance Actions
unref-0.5.0.tar.gz 255.9 kB Without provenance Details for unref-0.5.0.tar.gz

Built distributions (wheels)

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

Total release size: 21.1 MB

Release files / unref-0.5.0.tar.gz

Download URL unref-0.5.0.tar.gz
Size 255.9 kB
Tags Source
SHA-256 checksum
How to use checksums
efe47e7abc440fc5a874ef4281085b02ca0d42197e74ac6a816f0f1551e79a2c
BLAKE2b-256 checksum
How to use checksums
fe2fd9b29e55bfc0208c6239ddc056d39f965cc7ffe092819043a8d9cca1f425
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.0-py3-none-win_arm64.whl

Download URL unref-0.5.0-py3-none-win_arm64.whl
Size 2.5 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
c6e152e8fa16c2d15d47b91c70e888470c74c831fd5c530db34267031e7b89e1
BLAKE2b-256 checksum
How to use checksums
9a1ed18ceece6668dd092807f064dbc9d17389f432db2d3916c526e73083ea15
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.0-py3-none-win_amd64.whl

Download URL unref-0.5.0-py3-none-win_amd64.whl
Size 2.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e324f15594603ccd6eeb793ea4e06f6b47bdd2935be27ec7b6afcc4ba2632976
BLAKE2b-256 checksum
How to use checksums
b4c74fbd487b16df220fbdfe9f0d80974721b99be3936a758d0b4a142851c6e0
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.0-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.5.0-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
b2a2e5c30090951def8cde4b4882baef8eb6a39470717484acd6da7551adf1a0
BLAKE2b-256 checksum
How to use checksums
b395bb661e31111f1bc5b51f9614939ccc7859ba3f65e171e88c2c05bb2a6c28
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.0-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.5.0-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
a58916b54f92ed99c3a7ee85a1a599959eb0cc9516f61522e7d4b2c79c706317
BLAKE2b-256 checksum
How to use checksums
b30dc9a2d8160a2eeb724d38cfd37ecc9728fedb163647d7570abf7d948bfa0e
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.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

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

Download URL unref-0.5.0-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
866ee4b71ba3ef0f923f1a26ccdf77d881c208d8d529ed1e2784e80d075c34f5
BLAKE2b-256 checksum
How to use checksums
f00eaecb476049eda752fbfcc1a0f50c8a76236c9f232a4e288a8d41dbc6ae55
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.0-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.5.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
b57b471dba2733acb09a3c4edf43f029b548e414330f45948b279e9c6199181d
BLAKE2b-256 checksum
How to use checksums
7ac681fb78098d1c4bec2b19fdb943f3fb714d6f40a70d205a59479cfd7b6a06
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.0-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.5.0-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
48e2368248113e110b76f1a4e856ddebd39aeee7268f848d4595e528077dbf23
BLAKE2b-256 checksum
How to use checksums
40bce996cbe4ee8dd92433b731f2ac68bdb8c764070469ceabc7c8fa68756644
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.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