Skip to main content

An extremely fast Python package and project manager, written in Rust.

Project description

uv

uv image image image Actions status Discord

An extremely fast Python package and project manager, written in Rust.

Shows a bar chart with benchmark results.

Installing Trio's dependencies with a warm cache.

Highlights

uv is backed by Astral, the creators of Ruff.

Installation

Install uv with our standalone installers:

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Or, from PyPI:

# With pip.
pip install uv
# Or pipx.
pipx install uv

If installed via the standalone installer, uv can update itself to the latest version:

uv self update

See the installation documentation for details and alternative installation methods.

Documentation

uv's documentation is available at docs.astral.sh/uv.

Additionally, the command line reference documentation can be viewed with uv help.

Features

Projects

uv manages project dependencies and environments, with support for lockfiles, workspaces, and more, similar to rye or poetry:

$ uv init example
Initialized project `example` at `/home/user/example`

$ cd example

$ uv add ruff
Creating virtual environment at: .venv
Resolved 2 packages in 170ms
   Built example @ file:///home/user/example
Prepared 2 packages in 627ms
Installed 2 packages in 1ms
 + example==0.1.0 (from file:///home/user/example)
 + ruff==0.5.0

$ uv run ruff check
All checks passed!

$ uv lock
Resolved 2 packages in 0.33ms

$ uv sync
Resolved 2 packages in 0.70ms
Audited 1 package in 0.02ms

See the project documentation to get started.

uv also supports building and publishing projects, even if they're not managed with uv. See the publish guide to learn more.

Scripts

uv manages dependencies and environments for single-file scripts.

Create a new script and add inline metadata declaring its dependencies:

$ echo 'import requests; print(requests.get("https://astral.sh"))' > example.py

$ uv add --script example.py requests
Updated `example.py`

Then, run the script in an isolated virtual environment:

$ uv run example.py
Reading inline script metadata from: example.py
Installed 5 packages in 12ms
<Response [200]>

See the scripts documentation to get started.

Tools

uv executes and installs command-line tools provided by Python packages, similar to pipx.

Run a tool in an ephemeral environment using uvx (an alias for uv tool run):

$ uvx pycowsay 'hello world!'
Resolved 1 package in 167ms
Installed 1 package in 9ms
 + pycowsay==0.0.0.2
  """

  ------------
< hello world! >
  ------------
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||

Install a tool with uv tool install:

$ uv tool install ruff
Resolved 1 package in 6ms
Installed 1 package in 2ms
 + ruff==0.5.0
Installed 1 executable: ruff

$ ruff --version
ruff 0.5.0

See the tools documentation to get started.

Python versions

uv installs Python and allows quickly switching between versions.

Install multiple Python versions:

$ uv python install 3.10 3.11 3.12
Searching for Python versions matching: Python 3.10
Searching for Python versions matching: Python 3.11
Searching for Python versions matching: Python 3.12
Installed 3 versions in 3.42s
 + cpython-3.10.14-macos-aarch64-none
 + cpython-3.11.9-macos-aarch64-none
 + cpython-3.12.4-macos-aarch64-none

Download Python versions as needed:

$ uv venv --python 3.12.0
Using Python 3.12.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

$ uv run --python pypy@3.8 -- python --version
Python 3.8.16 (a9dbdca6fc3286b0addd2240f11d97d8e8de187a, Dec 29 2022, 11:45:30)
[PyPy 7.3.11 with GCC Apple LLVM 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>>

Use a specific Python version in the current directory:

$ uv python pin 3.11
Pinned `.python-version` to `3.11`

See the Python installation documentation to get started.

The pip interface

uv provides a drop-in replacement for common pip, pip-tools, and virtualenv commands.

uv extends their interfaces with advanced features, such as dependency version overrides, platform-independent resolutions, reproducible resolutions, alternative resolution strategies, and more.

Migrate to uv without changing your existing workflows — and experience a 10-100x speedup — with the uv pip interface.

Compile requirements into a platform-independent requirements file:

$ uv pip compile docs/requirements.in \
   --universal \
   --output-file docs/requirements.txt
Resolved 43 packages in 12ms

Create a virtual environment:

$ uv venv
Using Python 3.12.3
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

Install the locked requirements:

$ uv pip sync docs/requirements.txt
Resolved 43 packages in 11ms
Installed 43 packages in 208ms
 + babel==2.15.0
 + black==24.4.2
 + certifi==2024.7.4
 ...

See the pip interface documentation to get started.

Platform support

See uv's platform support document.

Versioning policy

See uv's versioning policy document.

Contributing

We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.

Acknowledgements

uv's dependency resolver uses PubGrub under the hood. We're grateful to the PubGrub maintainers, especially Jacob Finkelman, for their support.

uv's Git implementation is based on Cargo.

Some of uv's optimizations are inspired by the great work we've seen in pnpm, Orogene, and Bun. We've also learned a lot from Nathaniel J. Smith's Posy and adapted its trampoline for Windows support.

License

uv is licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in uv by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uv-0.6.9.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

uv-0.6.9-py3-none-win_arm64.whl (16.1 MB view details)

Uploaded Python 3 Windows ARM64

uv-0.6.9-py3-none-win_amd64.whl (17.4 MB view details)

Uploaded Python 3 Windows x86-64

uv-0.6.9-py3-none-win32.whl (15.9 MB view details)

Uploaded Python 3 Windows x86

uv-0.6.9-py3-none-musllinux_1_1_x86_64.whl (16.7 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

uv-0.6.9-py3-none-musllinux_1_1_i686.whl (15.8 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

uv-0.6.9-py3-none-musllinux_1_1_armv7l.whl (15.5 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

uv-0.6.9-py3-none-manylinux_2_28_aarch64.whl (15.4 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ ARM64

uv-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

uv-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (21.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

uv-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (16.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

uv-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (17.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64

uv-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (16.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

uv-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (15.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

uv-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (15.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64 musllinux: musl 1.1+ ARM64

uv-0.6.9-py3-none-macosx_11_0_arm64.whl (14.7 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

uv-0.6.9-py3-none-macosx_10_12_x86_64.whl (15.9 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

uv-0.6.9-py3-none-linux_armv6l.whl (15.8 MB view details)

Uploaded Python 3

File details

Details for the file uv-0.6.9.tar.gz.

File metadata

  • Download URL: uv-0.6.9.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.8

File hashes

Hashes for uv-0.6.9.tar.gz
Algorithm Hash digest
SHA256 ab6b55d14450175e79a8a819fc2728bfb6adf289ce03ab312654091fa7f6101a
MD5 edaada9a407880c047955697dbb1942c
BLAKE2b-256 9fc1a60065b94012132ddc4259b1c66f074acdd369b920398e31e12a3d536672

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-win_arm64.whl.

File metadata

  • Download URL: uv-0.6.9-py3-none-win_arm64.whl
  • Upload date:
  • Size: 16.1 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.8

File hashes

Hashes for uv-0.6.9-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 ffe6f6c8df7814b82cf9f6cc2cca0057e9bb3398b0538ecad3bf97664b1ffa99
MD5 09c7a105f5968c519fd49dde84383ea9
BLAKE2b-256 62a52ceaa73eb299eefbcbf98323a4dba5eebf67510c722726acd6a284c2a4c9

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-win_amd64.whl.

File metadata

  • Download URL: uv-0.6.9-py3-none-win_amd64.whl
  • Upload date:
  • Size: 17.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.8

File hashes

Hashes for uv-0.6.9-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5d4e1b62c86c9e0d16973df3db1ce0d448ca69708bbecf0e79b629debb540a07
MD5 80639c45ca77ac7c4e7a418aa8e2381c
BLAKE2b-256 721884ff5e0e940d18d7367fdd57bdba83ea131f1c3771f256faca1099e93690

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-win32.whl.

File metadata

  • Download URL: uv-0.6.9-py3-none-win32.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.8

File hashes

Hashes for uv-0.6.9-py3-none-win32.whl
Algorithm Hash digest
SHA256 c7bcd1312d066e4c8f85b450fc9879971733ef363ae9159bc24e832ad5e4a803
MD5 96af0422851f0af279e64e767e41ac90
BLAKE2b-256 6f2e7f29d10b036ac383f5a3a6c2cc1508fcf2542113616de59fc2d82105cb20

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ccc990a05ca500d98a67fe70b48f342f7e5b2f4cc32433f39f7aa34117e20dc3
MD5 880c2c51395ad780dcba951383849e10
BLAKE2b-256 e1ee82d02417a52b3a0faebd97fa01adbfe8d366021d6099827bfdbed83dcdea

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 915766098127cd47aa682907b3dbe3c5206de6655d014f05415b061c40270e37
MD5 ebcd5c907807a1411b50d8b33041df6c
BLAKE2b-256 03d70aa21108b001e253cd5ae30f4b4bce4a0a864e9624e23ec15b1af77cfb18

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-musllinux_1_1_armv7l.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 8112cac95281e3319a5b1320175e0a3c7d1d5be1f147a50e1f40d0bd3563c7f5
MD5 1c3781e2a162499ca13f1e51040c0427
BLAKE2b-256 148f3a63d5b00f132b71439d35f65da4cb11982dfaf40040f5f80a002eb9e842

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e9973a4e86249c10a39c80bd8ca284b103a0408b639e31ef764e5eb670c30382
MD5 660439f5765d1000348116a45499f5e1
BLAKE2b-256 89598c4dbfdd58e729e24132d9098adb9189cb53802c9f13a9d9f0f51d24c025

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e2db4fd0dc8aff8e7db1861022578f04c0b685d6cd9b81a0b1f7c2bcfa9947b
MD5 07ea8f6c029faa1f828e595e8cc82819
BLAKE2b-256 0714a32e6228535e6e84dc2dfe4409f19db6155f68e1e439a4e1f9b468c01ea2

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 b40a75f854736d103207aa706569a561c4018eaeebf4474debb2f102d5c9097c
MD5 8221933e7e48117627c8c5183d1432f7
BLAKE2b-256 2b836aad72ba535dfea21df39cdbadfcbc0a8ed18fe9e2eb5f4213dfc78d6d7a

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 04cd4a9567bcf3b5ed7746aa59077e261eb0a61fe8bc46b05416ee33ea132a77
MD5 fa73189371c3ddd13b7353a8b5678a88
BLAKE2b-256 a45bc29c244bdaacd52a625af4cdcf864ef3eef613b5b24a45f322888cd2e38f

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 bd7534c0b78b3dcaf1ac394b181ee09040e95aeaa93f8c0701e495f98bbb7fe5
MD5 a79e0966a389070361002b8c75d7d9fe
BLAKE2b-256 db0a53e8900d7a6dcc56a2f0ea534631c938b8dce8787b0e30094ec37ac1d1fd

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 9285b2d6bee0cfd7baa70570478f3c60b33450fd50ccbe03343a7cc5d9880dd4
MD5 f263a2555f5693eb749879afc29871a0
BLAKE2b-256 57fe143f66b08e95acfd4bc2b91b42665feeb04c242ae9998e0b328f548e5aec

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 e2351e8388fbe70c821aaa32da825a4ced91c42f4608a3833af606710e64a725
MD5 c9da78bcb2c7dd9bf4ab0a3d6620352f
BLAKE2b-256 541f7bd7b646e24487388e5fbd1894274c6c94d2a17e478f48960d2fa3663ebc

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 4e1cf5e02e7b7ca7d3ae8681cdbca79fdb2bb1a005a2ecc0e3f4fcccc664403d
MD5 0ad1d74c1be8c6b953d25b25d1f52e1c
BLAKE2b-256 124d206f57fcd5e6a48b43e4c7cec74f4aaa07fb01a47427d8b594361423fa2e

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8239c5e77dbce87211588f58f6d91ba30ceea03569baa2d3830860017e9dc13d
MD5 281d18d6fac3f22151eb0e1c07383e04
BLAKE2b-256 9bb5e12a756e7f3d45011baaf871f54be86a8772319c328a5776127dee83cfaf

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c742df7a174ce1e16192108a28658cd7292af63c34cb9a9d4b683d3678737fbb
MD5 a83051583c32548328ff32a8931ca716
BLAKE2b-256 cc9e6691e3a4c3fd759ec84f83d48cc00718cbb106d44e5f990cb986be1a4315

See more details on using hashes here.

File details

Details for the file uv-0.6.9-py3-none-linux_armv6l.whl.

File metadata

File hashes

Hashes for uv-0.6.9-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 7932640314e4b3b7416a07ef553667e1f113d25a67690fa0e00f1be7f1c20385
MD5 a57ff731ee361e8476e6492cf5ac8d86
BLAKE2b-256 cd2dce8bdeb7ef6fa2ed319ba8a0430b1a29abf731a266582df397e7df4dc8c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page