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, Pydantic, SQLAlchemy and more, so most projects need little or no configuration.
  • Accurate: names are matched by module, so a used parse in one module does not hide an unused parse in another.
  • Ruff-style: same conventions, options and output style as Ruff, and it finds the unused code Ruff leaves out.
  • Modern: ty-style rule codes, configuration in pyproject.toml, built on Ruff's parser.
  • 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.2.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.2.2
File Size Uploaded Provenance Actions
unref-0.2.2.tar.gz 222.4 kB Without provenance Details for unref-0.2.2.tar.gz

Built distributions (wheels)

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

Total release size: 19.9 MB

Release files / unref-0.2.2.tar.gz

Download URL unref-0.2.2.tar.gz
Size 222.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d6cbd6325073e4b8b225451522141339799fd7f935a120258c4c122e2e325318
BLAKE2b-256 checksum
How to use checksums
1fad8b611382542c123945a019d84ff796dba8ee86a371fb1fd92aec65b44a5f
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.2.2-py3-none-win_arm64.whl

Download URL unref-0.2.2-py3-none-win_arm64.whl
Size 2.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
6d32791d9da56d8d7f725c730dbae5e7a9c8160154f045e353f618a4d5f6e5bc
BLAKE2b-256 checksum
How to use checksums
4623d5512186120adf7bf581d6a67d82c11bb9f46a8d14d158495a951b2b86c2
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.2.2-py3-none-win_amd64.whl

Download URL unref-0.2.2-py3-none-win_amd64.whl
Size 2.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1bc5b7ab274ac1aad777e80cedb68f52bcc70d5941e98e09d35738fac7f08568
BLAKE2b-256 checksum
How to use checksums
ab5203dbe4b22d77f7ae07f2b86aa9e742738a024c786045e0f0a401e0222f55
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.2.2-py3-none-musllinux_1_2_x86_64.whl

Download URL unref-0.2.2-py3-none-musllinux_1_2_x86_64.whl
Size 2.6 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1c4ae12926b6a27c08a8d5deb62361f0893b15bf972c555b02c7d1b4b9c2deaf
BLAKE2b-256 checksum
How to use checksums
f2ea2ff8ed909c762f9a9a8237e313a120e3a4b78bb063d4a2e0d9eea60b0dc1
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.2.2-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.2.2-py3-none-musllinux_1_2_aarch64.whl
Size 2.4 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
3e3e2707238e79c624a7fc9e9996297c907023c6c3b1cccf2dd56f87a99bfc0e
BLAKE2b-256 checksum
How to use checksums
46f663e302be4f87f2941a7123d7ddbcb9a8cbae3af458bae11e773a3156990d
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.2.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.2.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
91b29d37c38a3d9585c328ce5b91db65f3ce8d713ae85c1e08cb8dc45ddd0995
BLAKE2b-256 checksum
How to use checksums
94f930be6b70bd52b573390b13d2a3a0309f8d0d26cfa85e25e4ffc79519ba46
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.2.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.2.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
eec8d5e656f957db361077bfe4f1577d2b653893de218e80a1cdabd9a2f2ab26
BLAKE2b-256 checksum
How to use checksums
de34fd7e753c01653c615367af5c44363b7db932971ddfcb0beb786cb6ba8db2
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.2.2-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.2.2-py3-none-macosx_11_0_arm64.whl
Size 2.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
98e0afd7e0e861e734c31af18416b345f9f4c8d8ed9a5488f6bf41497ed590e0
BLAKE2b-256 checksum
How to use checksums
e83fbc9ed7dc828b6d85f7738cd2fc51138cc7c42aa7ef5e60203bddd9183634
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.2.2-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.2.2-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
328c4eb4f77d96fbbe9397772518d259c8ef38d47a049707643d06c04c40574c
BLAKE2b-256 checksum
How to use checksums
906f3681e5dc52aff110e99206580a238568cf0b353f27921b2ae1a21d1f6897
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.2.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