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.2.0 # Or run `pre-commit autoupdate`.
    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.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.3.1
File Size Uploaded Provenance Actions
unref-0.3.1.tar.gz 234.6 kB Without provenance Details for unref-0.3.1.tar.gz

Built distributions (wheels)

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

Total release size: 20.7 MB

Release files / unref-0.3.1.tar.gz

Download URL unref-0.3.1.tar.gz
Size 234.6 kB
Tags Source
SHA-256 checksum
How to use checksums
04ac62fba69ecbd4df80c929ab8fe906e539ebc447b77ddab267cf189e3ae5cb
BLAKE2b-256 checksum
How to use checksums
c43233870a884cbf77a2c04f92f07bfc041a7e0b53981cdab0c24f8a2e666fac
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.1-py3-none-win_arm64.whl

Download URL unref-0.3.1-py3-none-win_arm64.whl
Size 2.5 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
249f041ab14bcc1558df8f6ea62d8484cb20ff8f55cbac1d8ad8805adb408faa
BLAKE2b-256 checksum
How to use checksums
13de955c4c5afdbfbe03989ede631de0ca165db58e7b3f6e64c6c3a4176bb6ce
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.1-py3-none-win_amd64.whl

Download URL unref-0.3.1-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
98b501dd6ab5392108f108fb99973d846a5125d2695242c5589505fb1b61b4d6
BLAKE2b-256 checksum
How to use checksums
f24b4e091cbaca568f2fce51001b44c7601a85438657920f0d53908a1b7afdb9
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.1-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.3.1-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
b69dd8b9f72baaf99dc2d90adeef4fff51e87bdad504ae70c20055cdeb904843
BLAKE2b-256 checksum
How to use checksums
8941c252c12363de23f22b751615a19600a654c975afe2522eec3f8ae54b3f5a
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.1-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.3.1-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
d13ac063d06ef9ef368d59baa9ba0566ad6657be40721b8605ad0cf11fedbf12
BLAKE2b-256 checksum
How to use checksums
9eaf622808a216707474150e4de7b02284411a312f9d2a80c5968720259a71c7
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.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.3.1-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
a9e37b825bd2fcdbd0b46b65730489ee799002c8d3f91f8525a1cd9204e2a74b
BLAKE2b-256 checksum
How to use checksums
5cd8549fedb8dcea99f078d695d3d290b67dbae5a9e03c753a6fd0d7d907118b
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.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.3.1-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
41b8f629a145349d14f7e29deda31353204583e5006cb3e794324cc5932e428d
BLAKE2b-256 checksum
How to use checksums
e144ba1b3dba63d62155aaa3be932ecbc8e6e503569ecd7f5892673b082dd1a7
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.1-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.3.1-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
58a24dc733b05eddc1f19a50208830c6b51d5f04d06fa1d2acc8e997fa9abe3d
BLAKE2b-256 checksum
How to use checksums
a36796f5768c0476f4b261654c4c08c869f2cc8a9477828a0047564b1bf76722
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.1-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.3.1-py3-none-macosx_10_12_x86_64.whl
Size 2.5 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bc99f6a479d34c702591a9aa147cd1ccc23e31771b919b1bdfc17f4b68c4cd24
BLAKE2b-256 checksum
How to use checksums
f64e24aed34df74fafbce0980420707e4eb4fe89fc5ad8a23a41957e0854e034
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.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