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

$ 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.4
Installed 1 executable: ruff

$ ruff --version
ruff 0.5.4

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 pypy@3.11
Pinned `.python-version` to `pypy@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

This version

0.5.1

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.1.tar.gz (2.1 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.1-py3-none-win_amd64.whl (15.2 MB view details)

Uploaded Python 3Windows x86-64

uv-0.5.1-py3-none-win32.whl (13.4 MB view details)

Uploaded Python 3Windows x86

uv-0.5.1-py3-none-musllinux_1_1_x86_64.whl (14.1 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

uv-0.5.1-py3-none-musllinux_1_1_ppc64le.whl (15.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ppc64le

uv-0.5.1-py3-none-musllinux_1_1_i686.whl (13.6 MB view details)

Uploaded Python 3musllinux: musl 1.1+ i686

uv-0.5.1-py3-none-musllinux_1_1_armv7l.whl (13.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARMv7l

uv-0.5.1-py3-none-manylinux_2_28_aarch64.whl (13.0 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

uv-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

uv-0.5.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (18.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

uv-0.5.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (14.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

uv-0.5.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (14.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

uv-0.5.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (13.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

uv-0.5.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (13.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

uv-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (12.8 MB view details)

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

uv-0.5.1-py3-none-macosx_11_0_arm64.whl (12.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

uv-0.5.1-py3-none-macosx_10_12_x86_64.whl (13.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

uv-0.5.1-py3-none-linux_armv6l.whl (13.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uv-0.5.1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.0

File hashes

Hashes for uv-0.5.1.tar.gz
Algorithm Hash digest
SHA256 ad2dd8a994a8334a5d4b354589be4b8c4b3b2ebb7bb2f2976c8e21d2799f45a9
MD5 1cb79b3010a4c79479a50054bb5e369d
BLAKE2b-256 d2ecc05991014f8208c1f3556d7dfc96ef5a6b7da6062e489718f3a0f9a74fb8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.5.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 922685dcaa1c9b6663649b379f9bdbe5b87af230f512e69398efc51bd9d8b8eb
MD5 7fed75092fd9110cde34e7f81ee40a12
BLAKE2b-256 8cb2ac107886f60081f6cd2295c9faf3c312a02c5aca87e8c0b7589340a58224

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.5.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 3ffb230be0f6552576da67a2737a32a6a640e4b3f42144088222a669802d7f10
MD5 d062e72e573ecdd67b6c9366a753fdbf
BLAKE2b-256 5e94d7546d96c0e447f56817be2210c4a9d75817d1072e526aaaf17f0dd59a3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 6a76765c3cc49268f3c6773bd89a0dacf8a91b040fc3faea6c527ef6f2308eba
MD5 578bbfff10442a903bd59ddc0e12c0c7
BLAKE2b-256 c50a956467ee8bfa59f698f384eef6e072b14b971d36b7ee6d9b8ed15cfed065

See more details on using hashes here.

File details

Details for the file uv-0.5.1-py3-none-musllinux_1_1_ppc64le.whl.

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-musllinux_1_1_ppc64le.whl
Algorithm Hash digest
SHA256 821b6a9d591d3e951fbe81c53d32499d11500100d66b1c119e183f3d4a6cd07c
MD5 347483d497e077aae0394753484e0e57
BLAKE2b-256 fce556d1457ac76bedce375c1adbfebeb281d94a24d35463350c7fc40f9413b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 4601d40b0c02aff9fb791efa5b6f4c7dbad0970e13ac679aa8fb07365f331354
MD5 9450b49ab4b7d17fa4f8c8e92af00545
BLAKE2b-256 28081ad7ef9ffd0f3c534cbcad47b57afdb785143ec46973faecc5c90de33025

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 3db7513c804fb89dcde671ba917cc486cfb574408d6257e19b19ae6b55f5982f
MD5 0c383f813265742227247b930a474bfb
BLAKE2b-256 110c5ba7bf4b5ca478cf8c9d660d7baa977af1cd3dda2981f20d0c8e436a48f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 01c40f756e9536c05fdf3485c1dfe3da610c3169195bbe20fab03a4c4b7a0d98
MD5 15d9129c3fb2f744fb8fbc068e0cf692
BLAKE2b-256 43801d887496fa3f2853dd670e43da90ee6efa8e020c82e3a1e2b41c19006d9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d1ec4a1bc19b523a84fc1bf2a92e9c4d982c831d3da450af71fc3057999d456
MD5 c5fd4b2b1b77f66aee3b5063275fead3
BLAKE2b-256 be24b2f69c0adb60d4c5d3c5413454ab869ed275db52da4be02eaa9d1a149191

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 72b54a3308e13a81aa2df19baea40611fc344c7556f75d2113f9b9b5a894355e
MD5 2c1663ce45325b69f4d0394c0448d62c
BLAKE2b-256 511a38edd7edf8fc73d1db87130f4ac62f2381166fabcc36288b63d82e43373c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 ac3fce68002e79f3c070f3e7d914e992f205f05af00bfffbe6c44d37aa39c86a
MD5 7997e583e651ea60de58aa0ba3749076
BLAKE2b-256 9e65bae32b05056ba6b5441a491ce17c8216ec92cfade62a7b44702758689646

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 aaa63053ff6dc4456e2ac2a9b6a8eda0cfaa1e0f861633d9e7315c7df9a0a525
MD5 95bed537f6d2c7c8be1c0609a349d019
BLAKE2b-256 eb8c2b3c642d71f18eff826a74329b23a269f2962b52d251854b645c98121e15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8dce5b6d6dea41db71fe8d9895167cc5abf3e7b28c016174b1b9a9aecb74d483
MD5 42d8b05b7188336d635f6f663183c145
BLAKE2b-256 0f810c08c94a9c9f27adc11fd9c3f55d6244c3066cbdea1a9c636fcc1bf45d53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 73853b98bce9e118cda2d64360ddd7e0f79e237aca8cd2f28b6d5679400b239e
MD5 decae2f1cc8178b242456e6acbb8d103
BLAKE2b-256 86fc74a2fbfb9fc5c1772c0f85718da3e79a05aa3bdd5db1d83851f33e119e01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 6ec61220d883751777cbabf0b076607cfbdeb812bc52c28722e897271461e589
MD5 2ae453a3a8d3087c28f11640b5c54cf6
BLAKE2b-256 88f1244f0f5e0afdc86de3c12c62c51f594a8b900d8ae1bf7cc64d9d92147199

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4d209164448c8529e21aca4ef1e3da94303b1bf726924786feffd87ed93ab4a
MD5 061b8101a3f1480c2057949ba9a6d087
BLAKE2b-256 a7ef375bb00fa3e73cbb29ffd1d2a0cea3a52b4c0e67f68bce646a9ed0539f18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f66859e67d10ffff8b17c67c7ede207d67487cef20c3d17bc427b690f9dff795
MD5 3767a7afcf514ea2d2ee56bcf04a8a7a
BLAKE2b-256 6b23f0f8234624f720b5a856800d85a2220405182cfd798eefbda8b7868f9c4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.5.1-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 93f0a02ea9149f4e7e359ef92da6f221da2ecf458cda2af729a1f6fa8c3ed1d2
MD5 126ed96f66d2ccb0a56a331b94cf1772
BLAKE2b-256 ba339183528527cb8532369b678e1d12fb97e3777fed875f1d7ea6c75c570f64

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