Skip to main content

pre-commit-uv

PyPI PyPI - Implementation PyPI - Python Version Downloads PyPI - License check OpenSSF Scorecard OpenSSF Best Practices

Use uv to create virtual environments and install packages for pre-commit.

Changelog

Contributing

Installation

With pipx:

pipx install pre-commit
pipx inject pre-commit pre-commit-uv

With uv:

uv tool install pre-commit --with pre-commit-uv --force-reinstall

Why?

pre-commit-uv uses uv to create and seed hook environments. Caching the pre-commit directory avoids this work on later runs, but the first install still needs it. This benchmark used this project's hooks with a warm uv cache:

❯ hyperfine  'pre-commit install-hooks' 'pre-commit-uv install-hooks'
Benchmark 1: pre-commit install-hooks
  Time (mean ± σ):     54.132 s ±  8.827 s    [User: 15.424 s, System: 9.359 s]
  Range (min … max):   45.972 s … 66.506 s    10 runs

Benchmark 2: pre-commit-uv install-hooks
  Time (mean ± σ):     41.695 s ±  7.395 s    [User: 7.614 s, System: 6.133 s]
  Range (min … max):   32.198 s … 58.467 s    10 runs

Summary
  pre-commit-uv install-hooks ran 1.30 ± 0.31 times faster than pre-commit install-hooks

Configuration

Once installed, pre-commit-uv uses uv by default. Set DISABLE_PRE_COMMIT_UV_PATCH to use pre-commit's normal installation path instead.

The patch loads when the process appears to be running pre-commit. If detection misses a call, set FORCE_PRE_COMMIT_UV_PATCH and report the value of sys.argv in an issue. DISABLE_PRE_COMMIT_UV_PATCH takes precedence when both variables are set.

Metadata

Release files for pre-commit-uv 4.4.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 pre-commit-uv 4.4.2
File Size Uploaded Provenance Actions
pre_commit_uv-4.4.2.tar.gz 11.7 kB With provenance Details for pre_commit_uv-4.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pre-commit-uv 4.4.2
File Interpreter ABI Platform Actions
pre_commit_uv-4.4.2-py3-none-any.whl Python 3 none any Details for pre_commit_uv-4.4.2-py3-none-any.whl

Total release size: 17.3 kB

Release files / pre_commit_uv-4.4.2.tar.gz

Download URL pre_commit_uv-4.4.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a29a29fe2e0b294ba5a75e28b0ca7804eb04609129603b1897411e44aed8701c
BLAKE2b-256 checksum
How to use checksums
b463c11a21bb0c80ceb834996882c9b8cbde1688c0316b7732840f8ca7b7e41e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / pre_commit_uv-4.4.2-py3-none-any.whl

Download URL pre_commit_uv-4.4.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
baabbe110cd090b180412c50a62fd0740ca9b59a35d4fa46985bb18bb65d4942
BLAKE2b-256 checksum
How to use checksums
b73ab42a54f5e9c7b6aed9d9bdebdc3416adfd645b062d950f5f6ca2e4a23934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for pre-commit-uv 4.4.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pre_commit_uv-4.4.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

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