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

Project management

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!

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.

Tool management

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 management

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.

Script support

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.

A pip-compatible 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.5.20.tar.gz (2.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uv-0.5.20-py3-none-win_amd64.whl (16.6 MB view details)

Uploaded Python 3Windows x86-64

uv-0.5.20-py3-none-win32.whl (15.2 MB view details)

Uploaded Python 3Windows x86

uv-0.5.20-py3-none-musllinux_1_1_x86_64.whl (16.1 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

uv-0.5.20-py3-none-musllinux_1_1_i686.whl (15.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ i686

uv-0.5.20-py3-none-musllinux_1_1_armv7l.whl (14.9 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARMv7l

uv-0.5.20-py3-none-manylinux_2_28_aarch64.whl (15.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

uv-0.5.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

uv-0.5.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (20.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

uv-0.5.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (16.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

uv-0.5.20-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (16.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

uv-0.5.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (15.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

uv-0.5.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (14.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

uv-0.5.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (14.7 MB view details)

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

uv-0.5.20-py3-none-macosx_11_0_arm64.whl (14.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

uv-0.5.20-py3-none-macosx_10_12_x86_64.whl (15.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

uv-0.5.20-py3-none-linux_armv6l.whl (15.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uv-0.5.20.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.19

File hashes

Hashes for uv-0.5.20.tar.gz
Algorithm Hash digest
SHA256 896305cc0d1f5fc5db97ed8e028c2fe236f6e0900bc72469d61ad97bc7ec5124
MD5 08f280c01f3fc2a6820a4d9e7ef4ca52
BLAKE2b-256 0b614cc21e8e79cebb4e49a6ca214a0647b00f49cb585886e0bf5e2490fe9e7c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.5.20-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ae9a69696e75d4b8d08dadda84b3e1b914167b2a19cd4c7c746f8c2c2c5ab55a
MD5 0f5ecd9ab5df02190bc30ee246c4b04a
BLAKE2b-256 d9e7cad364f24fcb03ff23e4b750d8934e62010fd520955ba64f8e763c1a70b6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.5.20-py3-none-win32.whl
Algorithm Hash digest
SHA256 880bc5afdfaaf5329318d897bec9cd860d00c2b2f2ab8979c438862a0c2ed81b
MD5 e67e81b61cbcac8afaafcd2cbd43a724
BLAKE2b-256 973d1a48ad47d29a8a6f07990eb1d50029f8d7a30a5dead0fd50d9cd47ee283f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5af0ae866b0a9f2d7e8c0220401c585de69f5ebc157a582e8cb1014b16da1ef7
MD5 d4a3aa9ae9ba9c99019926ddfbde6eb6
BLAKE2b-256 54865746288daaedc86da54da1fe1fe1440e01d0acd833995b8e784dba75f85d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 32d8685d262fca595a027ceca584549b0fe87b89be114e500f5af1de0fad2f1d
MD5 b34ec8fe91744fe2b3985e272fc4fd06
BLAKE2b-256 54a10d02aad39ccf64095d020759375014eaea6b885cd9ecde52d0d4843567f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 2f84a5df76bdb31fa76a4b85bcdb86fae9a4418ad9067d2909c58917663fb743
MD5 04e71ce07d4bff3840bdb7745505d434
BLAKE2b-256 3da271e9b149ed36613c99b78a643237b471244071359f0e5d8d5e08230d7ea0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a4049cb7de46bd36d3b770ae3203e36d1db406ddc048bcd509578fd1d1072a38
MD5 3454e30bd02fa705b1994dfc8498f365
BLAKE2b-256 ad29cdda048af5c2aa2adcce6d133af217253cd76509d09b3b766762e2524758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c337f7e029dc8faf020dd76847ea084591ea96fd5f40ddb5117214ecb12a9e6
MD5 99cd0c096ce8f7f704d370842fa6587d
BLAKE2b-256 046083b8185a23384ffcee4c07a8a2f5892b957b8c68aceba2b9832fab49b137

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 180b03d8fe0712297235498944252af19265aab396d22aef3783e963cfbfbcaf
MD5 aee7591fc1fb687daa266d48a1c9d937
BLAKE2b-256 58f78c7cc0378d0c02f4a95910de96b37b0163fc09a847948676f6d139b6bdd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 bbdc9f82cdcb539549654c85aada1c583fe18235666316599648657ff497f266
MD5 72db38c5bba21198e9d00a0727426b3d
BLAKE2b-256 f914d833b564f16d0723015687580f834a3531e64f7c79d4ad14034357496bc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 4c23cde62f48b19a0dc6922f5c144b02c0c21b1c2e2606be872fc656e95a25e1
MD5 f61faa221f6c253818392f6d6921b1f5
BLAKE2b-256 d0886d7b5ac6f8c78fe92c4a29d82d9b66c2b0b3177345d29f65fa15842cc1fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b1541a67de42e64d9ff594b9a21ec238681ff0e40b2f90c1ecabcac71c7e622c
MD5 fa385e68d53a2f71881be6718c44385a
BLAKE2b-256 112905af45986c7f0591b3c4a31c63e2d2d6dab3b3603a2ec50ee9e5b0c835b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3010eb9611f89f4d6fa681c406269c59c0faf3446bb9ef01abcfb7da600a88e7
MD5 4045d55614d538668a60830e62f5360c
BLAKE2b-256 d09dc0b865134b23e724cf02accdb93de3469808ffe34b9805a31ed9a483e339

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 ffce28f4b460f88f6e30d2a42874ee4d0e0daafe3d0436cda91ed05b130d7c90
MD5 88ea4e797df00006400b3e294c10ab99
BLAKE2b-256 b438d8f48e30d5a32fd8610fdf5fde1b96a7f9ae89799a5baabaf633e5ea0483

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3b38c2d5c14847fb68cf7c88bfee3e09dd170e1b229441cee40c98ce5f56c5e
MD5 c4e94a2e384483650df7898d93f6278d
BLAKE2b-256 d8bfb2cf36530206fc46533e6b384756043c3c04acbe930ac1f5498b825fbea9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0c73540d6afb923ea64a5a54ddd34fec191f91c4b1071bf65a2ea7b05a854017
MD5 68261a603521405616e8116ea182d9a9
BLAKE2b-256 e6a5f413ece0d351dbd2ab9067b42d111e7da6b3f133074ef245eb202891183e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.20-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 c299d2c7aa04803c16ed5378e4b5dbfcc57eb6a40962f1141520eb43c0ecd291
MD5 381c3e37a579db0fd114c0d52502137f
BLAKE2b-256 8b22a3f24aa6f405756f69b0eb1b974bf0e9d9c744f1effc3e82d56ce46b5519

See more details on using hashes here.

Supported by

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