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

Uploaded Source

Built Distributions

uv-0.7.8-py3-none-win_arm64.whl (17.2 MB view details)

Uploaded Python 3 Windows ARM64

uv-0.7.8-py3-none-win_amd64.whl (18.5 MB view details)

Uploaded Python 3 Windows x86-64

uv-0.7.8-py3-none-win32.whl (17.0 MB view details)

Uploaded Python 3 Windows x86

uv-0.7.8-py3-none-musllinux_1_1_x86_64.whl (17.6 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

uv-0.7.8-py3-none-musllinux_1_1_i686.whl (16.7 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

uv-0.7.8-py3-none-musllinux_1_1_armv7l.whl (16.4 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

uv-0.7.8-py3-none-manylinux_2_28_aarch64.whl (16.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ ARM64

uv-0.7.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.5 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

uv-0.7.8-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (22.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

uv-0.7.8-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (17.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

uv-0.7.8-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (18.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64

uv-0.7.8-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (17.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

uv-0.7.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (16.4 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

uv-0.7.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (16.0 MB view details)

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

uv-0.7.8-py3-none-macosx_11_0_arm64.whl (15.6 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

uv-0.7.8-py3-none-macosx_10_12_x86_64.whl (16.8 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

uv-0.7.8-py3-none-linux_armv6l.whl (16.7 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.8.tar.gz
Algorithm Hash digest
SHA256 a59d6749587946d63d371170d8f69d168ca8f4eade5cf880ad3be2793ea29c77
MD5 3cc0ed0c1235042401ff107c0b26abb5
BLAKE2b-256 0c4fc26b354fc791fb716a990f6b0147c0b5d69351400030654827fb920fd79b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.8-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 ad79388b0c6eff5383b963d8d5ddcb7fbb24b0b82bf5d0c8b1bdbfbe445cb868
MD5 a49aecf2778d286c886b7df6649e2132
BLAKE2b-256 1552fd76b44942ac308e1dbbebea8b23de67a0f891a54d5e51346c3c3564dd9b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b5b62ca8a1bea5fdbf8a6372eabb03376dffddb5d139688bbb488c0719fa52fc
MD5 3c333259d5c62c5a78b39f90c275ca23
BLAKE2b-256 4b805c78a9adc50fa3b7cca3a0c1245dff8c74d906ab53c3503b1f8133243930

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.8-py3-none-win32.whl
Algorithm Hash digest
SHA256 6ebe252f34c50b09b7f641f8e603d7b627f579c76f181680c757012b808be456
MD5 17542a6b7b9fc24bb76baf984ce3c7f4
BLAKE2b-256 6f56db6db0dc20114b76eb48dbd5167a26a2ebe51e8b604b4e84c5ef84ef4103

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 91d022235b39e59bab4bce7c4b634dc67e16fa89725cdfb2149a6ef7eaf6d784
MD5 0958ebf71ed8ef315adfa9497d8f74d1
BLAKE2b-256 1469a2d110786c4cf093d788cfcde9e99c634af087555f0bf9ceafc009d051ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 4a117fe3806ba4ebb9c68fdbf91507e515a883dfab73fa863df9bc617d6de7a3
MD5 07e1073fa05a902e2a48a559d11a1bbd
BLAKE2b-256 6595a079658721b88d483c97a1765f9fd4f1b8b4fa601f2889d86824244861f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 0c691090ff631dde788c8f4f1b1ea20f9deb9d805289796dcf10bc4a144a817e
MD5 3f9e98c0228d5658ef691b586fcc9ae0
BLAKE2b-256 24a5c1fbffc8b62121c0d07aa66e7e5135065ff881ebb85ba307664125f4c51c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3c620cecd6f3cdab59b316f41c2b1c4d1b709d9d5226cadeec370cfeed56f80c
MD5 c10577c850402c39faaf5d7996099ea0
BLAKE2b-256 bb70666be8dbc6a49e1a096f4577d69c4e6f78b3d9228fa2844d1bece21f5cd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 81ac0bb371979f48d1293f9c1bee691680ea6a724f16880c8f76718f5ff50049
MD5 d2c31a51e5f7e7fa998f08cf12b14d44
BLAKE2b-256 06360e7943d9415560aa9fdd775d0bb4b9c06b69c543f0647210e5b84776658b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 409cee21edcaf4a7c714893656ab4dd0814a15659cb4b81c6929cbb75cd2d378
MD5 5a398349a38d96e1b13a2d3e78136c6b
BLAKE2b-256 d762988cca0f1723406ff22edd6a9fb5e3e1d4dd0af103d8c3a64effadc685fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 9221a9679f2ffd031b71b735b84f58d5a2f1adf9bfa59c8e82a5201dad7db466
MD5 eceafe3eca551a8263c0e79727aec417
BLAKE2b-256 8fa49fa0b6a4540950fe7fa66d37c44228d6ad7bb6d42f66e16f4f96e20fd50c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 4acc09c06d6cf7a27e0f1de4edb8c1698b8a3ffe34f322b10f4c145989e434b9
MD5 4177b987340e8f05f1a38d14435922c7
BLAKE2b-256 d096299bd3895d630e28593dcc54f4c4dbd72e12b557288c6d153987bbd62f34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 13af6b94563f25bdca6bb73e294648af9c0b165af5bb60f0c913ab125ec45e06
MD5 6d57e59005c12a8e5438e0d41fa52fad
BLAKE2b-256 c3cca396870530db7661eac080d276eba25df1b6c930f50c721f8402370acd12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2a07bdf9d6aadef40dd4edbe209bca698a3d3244df5285d40d2125f82455519c
MD5 8e80ea87f9cc8d34f4e4db9048cb7995
BLAKE2b-256 c72ea914e491af320be503db26ff57f1b328738d1d7419cdb690e6e31d87ae16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 c058ee0f8c20b0942bd9f5c83a67b46577fa79f5691df8867b8e0f2d74cbadb1
MD5 65208fbd18c0b38fc17efb9a2e6b34ae
BLAKE2b-256 adf13d403896ea1edeea9109cab924e6a724ed7f5fbdabe8e5e9f3e3aa2be95a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f749b58a5c348c455083781c92910e49b4ddba85c591eb67e97a8b84db03ef9b
MD5 792d7d519bec74fc429cec9e446c7561
BLAKE2b-256 26281573e22b5f109f7779ddf64cb11e8e475ac05cf94e6b79ad3a4494c8c39c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b83866be6a69f680f3d2e36b3befd2661b5596e59e575e266e7446b28efa8319
MD5 c5b5ce9bbdcf2809e1d718b155ba76ea
BLAKE2b-256 b4bd0bc26f1f4f476cff93c8ce2d258819b10b9a4e41a9825405788ef25a2300

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.8-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 ff1b7e4bc8a1d260062782ad34d12ce0df068df01d4a0f61d0ddc20aba1a5688
MD5 d92baecd9d0769706ff643251c7da5cf
BLAKE2b-256 db48dd73c6a9b7b18dc1784b243cd5a93c14db34876c5a5cbb215e00be285e05

See more details on using hashes here.

Supported by

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