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.4

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.4
File Size Uploaded Provenance Actions
pre_commit_uv-4.4.4.tar.gz 12.8 kB With provenance Details for pre_commit_uv-4.4.4.tar.gz

Built distribution (wheel)

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

Total release size: 70.7 kB

Release files / pre_commit_uv-4.4.4.tar.gz

Download URL pre_commit_uv-4.4.4.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d24adfe6e4c59680683c4372bd0237030fa00f9f76a429cc6a0880a680b150c
BLAKE2b-256 checksum
How to use checksums
1ee4e10513300ce7bedfd967c979a0c8577e452de2b3f011fe79791b4bbe2774
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 Dec 6, 2026.

Transparency log

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

Download URL pre_commit_uv-4.4.4-py3-none-any.whl
Size 57.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adb33ba6e0e83059b410646c4e98124a0b30eedc6f9c52ef93dd5ac6e82005e9
BLAKE2b-256 checksum
How to use checksums
4589774c9f37c015a7cd60ad30a10f5818f9933b453b6461374af595f757691a
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 Dec 6, 2026.

Transparency log

Security for pre-commit-uv 4.4.4

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pre_commit_uv-4.4.4.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 Dec 6, 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