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.16.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

uv-0.6.16-py3-none-win_arm64.whl (16.8 MB view details)

Uploaded Python 3 Windows ARM64

uv-0.6.16-py3-none-win_amd64.whl (18.1 MB view details)

Uploaded Python 3 Windows x86-64

uv-0.6.16-py3-none-win32.whl (16.5 MB view details)

Uploaded Python 3 Windows x86

uv-0.6.16-py3-none-musllinux_1_1_x86_64.whl (17.4 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

uv-0.6.16-py3-none-musllinux_1_1_i686.whl (16.5 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

uv-0.6.16-py3-none-musllinux_1_1_armv7l.whl (16.2 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

uv-0.6.16-py3-none-manylinux_2_28_aarch64.whl (16.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ ARM64

uv-0.6.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

uv-0.6.16-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (21.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

uv-0.6.16-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (17.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

uv-0.6.16-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (17.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64

uv-0.6.16-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (16.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

uv-0.6.16-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (16.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

uv-0.6.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (15.7 MB view details)

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

uv-0.6.16-py3-none-macosx_11_0_arm64.whl (15.3 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

uv-0.6.16-py3-none-macosx_10_12_x86_64.whl (16.6 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

uv-0.6.16-py3-none-linux_armv6l.whl (16.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uv-0.6.16.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.15

File hashes

Hashes for uv-0.6.16.tar.gz
Algorithm Hash digest
SHA256 965312f4fd9dda88f688e23edad34324abd1e094acfc813bb476f8bf9a18e44b
MD5 2db4cfc16d656b3ca37623b811792cb4
BLAKE2b-256 28ba1a5e6dcaa5412081fc900f44403f61188c035565e7df5bf658c266c90539

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.6.16-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 011f1779536f24d2c46bdc6fe917add943e00a5a45d9ac46be8a281f4ed1c6b7
MD5 6d48d54e0e5cbaa4bd4ca500ddb90faa
BLAKE2b-256 eeda072c624ece2bcb85bed7590a175bf1029b97659cdb7d0c92e1fc66c507dc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.6.16-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 33f4c6b413e3c81d85ccd52bb8a19c11f0587fcbabca731582e0ecded94e1b06
MD5 04297120830e2ad177a3a4ecb30349bd
BLAKE2b-256 bc1cbcb84be3642f59ad5270e2e9a9395ec6ffab640ce51a43dbe49e30211c1f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.6.16-py3-none-win32.whl
Algorithm Hash digest
SHA256 6f73d349dcdfea8f7a88ab1c814fd96392a23cc45cc8481505987938f508f982
MD5 0ee85940b665e72526fcbcf0bef40554
BLAKE2b-256 55c4546f760d3b49c7632a95f038536b75f9b7d850c505d1bd31ff9fc2cf5929

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8ea9e54cc497eb16df87b9e0e41df8f04e9fd4b7ae687097cd706446d10dd14d
MD5 726ded95c9b8c7cc3961096860e5c5d1
BLAKE2b-256 e8fe9da8e985dbd9737a12011cb6ab8ab832800cec69ec6c59f98821ae75602b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 13366a987a732024c78a395bea7fdb8dc0a6a83827f6808cf7b7e528f6239356
MD5 1a991fb8420d5ead835919db36cf7ba2
BLAKE2b-256 c358886fda363c69ae62ccfd737160d4580ab46354f172340dbcf7d269bc358d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 f75470257c62bd07e3bed37b3a43ed062d9e2c5574612f447cbdc497d8295b22
MD5 d2bad3a0cafe6c98c51caada5d5c828a
BLAKE2b-256 acfcfb766b778ea1ac1f5b10754d1916570a8abbbf95a975f6c1792fc90a62be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d5a179f2f52ada41dc4390053d61697bb446eadba4db5c5ce99907b65e866886
MD5 460f6a63725e1333738044d103d8783e
BLAKE2b-256 66ddf94bf87c703001ece8dea163c3e270401971102ec6c18f735249f4b126c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e81c8cc7f2f23afb35860a6acd246e2d4bd28da18c259bf82e11f9157675d2a
MD5 9620811f50d02affe513fe493ac969b8
BLAKE2b-256 ef8f5ad211baa88ecd3ae1a4c17af987f6ae7106cc3020d5bf2ede317902482f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4ba02ea37b974d349ab7aaebd19cd0f11bf3d43db3267460eec511d2e40d0ef5
MD5 993143b7729631557b24d3b3a70cc555
BLAKE2b-256 220bd9124e59a6d5ba1fdc878be9b17e9372d1dc55de2f2a64762b5e62980dce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 709d35b8f6218fff54be1c7be72ef03829012b9499e57e5235dcbfb726cc8f60
MD5 df0155e405b880d4a6188c188470345d
BLAKE2b-256 b924af283239485b66360528fff68559dbdba4040d47cd7e5c297d629ed3077c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 61a143ee717017fa613d5932c4498d6a53730f2259c93ee1138d97e138742cfc
MD5 632688668cccb3d9b0ce9a2c4746064c
BLAKE2b-256 49a75c0523c6cfd239ff1b61fc8898278c3a0e6923bb77f371d9a0056fea99d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 61f7cf29224eae670c7a52316fdaa991ecc6bb03ecd15dea94127f324b72a349
MD5 5c3c5d92d84be0bb57bda0152223622d
BLAKE2b-256 bcd392170337bce936c9e8368065d3e3ec570fc1e21456285c6ca8a6fcfc2412

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 783051db6b6ff9b37664e85469903894879c2b9ca3a6ee99ad43e2e670607cae
MD5 689eb4729d7e0d755b927132d5c929be
BLAKE2b-256 cdd13f5da1df02ca15d48933875be14d7f72d0e968a0b3de454da15ba36b550a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 eb9a6af2351ddeae6fb4e527df9c46323f2a3ff6b005b404b57b32bf41f0a451
MD5 92465e57478752fa8827f1f2a8618a10
BLAKE2b-256 861ba6eaf596a88ba7e512c4139320ad4859fb53225576f5959f90039b78692d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64eb34dcb72fc4b97c634f6b0efea82efe0132ecb47aaebdda29d20befe40b83
MD5 32279f628c1d9c8f6ef41cfec2ae8427
BLAKE2b-256 5acb1dbd857137f9ecffad30f0c2349dfa21d9f54f2677c2f484770942578b68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 29c5833ee02d92858e711d6403934e0118adc998aadc50b714c3b9ec06561351
MD5 9d89c1a757d35ca7e7cfa97e22c4c881
BLAKE2b-256 a81aa45138b79f4f398546a14a3103f0be13e0d4ab742dc7aee21d8f2c5eee86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.6.16-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 e5bba128f384b89ffeb9625e6f753ef1612f900366b8aa48e0e5a44747a69121
MD5 1e4ec5fee6b97a0cb46e1918dcbd694b
BLAKE2b-256 33ec277eda61ccd12db9707b8671e5cc5894a88b08c17051d7ae8314867c8c18

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