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 files), measured with scripts/benchmark.py.

  • Fast: 20x faster than vulture, it checks all of CPython 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.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.2.1
File Size Uploaded Provenance Actions
unref-0.2.1.tar.gz 214.1 kB Without provenance Details for unref-0.2.1.tar.gz

Built distributions (wheels)

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

Total release size: 19.7 MB

Release files / unref-0.2.1.tar.gz

Download URL unref-0.2.1.tar.gz
Size 214.1 kB
Tags Source
SHA-256 checksum
How to use checksums
485adccd5308d4ead249c937ef1f863e1659916cda13d56f7277e48f49ec9a66
BLAKE2b-256 checksum
How to use checksums
179bfd619f2a69d74aa2cb319ae34eddb1641abbf53619abea9a42fa39a1ae85
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.1-py3-none-win_arm64.whl

Download URL unref-0.2.1-py3-none-win_arm64.whl
Size 2.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
fa7d0735c87e5385d6f69a1d8e53df8f55f42f3140111a059bad329a021dfa62
BLAKE2b-256 checksum
How to use checksums
e63cc96adf84287378642674b6f525a8d7398a2c1a2e23e1b17bc050a2d2e10c
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.1-py3-none-win_amd64.whl

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

Download URL unref-0.2.1-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
e051e468f1edae9994ab472d84ce20003ba6c22a889cb7b5cc3d25f7af847827
BLAKE2b-256 checksum
How to use checksums
97937a0c086de9874b93665320243ebb091a09a9614703f3f61c7d5074a4c46f
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.1-py3-none-musllinux_1_2_aarch64.whl

Download URL unref-0.2.1-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
cbf4f68cc93c33a91722c40e1a3652282253cf8cd95e9b9d5da65446ca792c1e
BLAKE2b-256 checksum
How to use checksums
3c046fb7704c1aa98cd2c038da701c5917f1141b019d84cba1838bbf891f2cf0
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.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL unref-0.2.1-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
50505b1168aec068980fcca8c4c97891c25ad19181c689857f202351af98839d
BLAKE2b-256 checksum
How to use checksums
6951dd220a7ac62c787c2d67b458941a989ec936a86e06bb33de780f36d679b6
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.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL unref-0.2.1-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
9373efaf073a724909ff1a316f5892e703c2847806f29b1bb4839d079b72ef7e
BLAKE2b-256 checksum
How to use checksums
1866abe48005d99e8aba88e99826b856d21d30e04402d8c1c0f2936698bb8b44
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.1-py3-none-macosx_11_0_arm64.whl

Download URL unref-0.2.1-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
1ee918d8afcfbe787eab7d6bfbbfcf90a79f7f254ca2e8bf5011ffecdd34c2a0
BLAKE2b-256 checksum
How to use checksums
720b8ac69aaa157b3d5b5dd95b162e4c3d676b433f4f6e0db6e97b993a622b08
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.1-py3-none-macosx_10_12_x86_64.whl

Download URL unref-0.2.1-py3-none-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
aaaf56fe4ab0fb0a20a34ffcf2111990b2a6b59ad6bef228ef41c1514296c2c2
BLAKE2b-256 checksum
How to use checksums
4703223d70651b8f0888cd82f8fb5e855dbbf207717743aa145e2f8123ff9e0a
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.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