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.

FAQ

How do you pronounce uv?

It's pronounced as "you - vee" (/juː viː/)

How should I stylize uv?

Just "uv", please. See the style guide for details.

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

Uploaded Source

Built Distributions

uv-0.7.21-py3-none-win_arm64.whl (18.0 MB view details)

Uploaded Python 3Windows ARM64

uv-0.7.21-py3-none-win_amd64.whl (19.4 MB view details)

Uploaded Python 3Windows x86-64

uv-0.7.21-py3-none-win32.whl (17.7 MB view details)

Uploaded Python 3Windows x86

uv-0.7.21-py3-none-musllinux_1_1_x86_64.whl (18.7 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

uv-0.7.21-py3-none-musllinux_1_1_i686.whl (17.8 MB view details)

Uploaded Python 3musllinux: musl 1.1+ i686

uv-0.7.21-py3-none-musllinux_1_1_armv7l.whl (17.4 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARMv7l

uv-0.7.21-py3-none-manylinux_2_28_aarch64.whl (17.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

uv-0.7.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

uv-0.7.21-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (18.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

uv-0.7.21-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (19.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

uv-0.7.21-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (19.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

uv-0.7.21-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (18.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

uv-0.7.21-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (17.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

uv-0.7.21-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (17.1 MB view details)

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

uv-0.7.21-py3-none-macosx_11_0_arm64.whl (16.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

uv-0.7.21-py3-none-macosx_10_12_x86_64.whl (17.9 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

uv-0.7.21-py3-none-linux_armv6l.whl (17.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uv-0.7.21.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for uv-0.7.21.tar.gz
Algorithm Hash digest
SHA256 9da06b797370c32f9ac9766257602258960d686e3847e102d9c293a77f8449e7
MD5 b20fbb9437ee00592aff1492c62974a7
BLAKE2b-256 305fd4356a6e9643fac913dc37b84fe1fb9e1baa34ce8dff17a214db2f4198cb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.21-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 2a69a4c4d85b3edf91aeb6aa9f6bcedf423df0e4dfccae6b33410843c8b2d359
MD5 4b24e0b84297d3e55d734d6087e4fa05
BLAKE2b-256 2b82a2710aa914164bf782500e233a198adc22cec48ef716e40d5681866003b3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.21-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6f3a5c02531deeb28fda27a6aa0184d9aaf2cd5d5875ea4e3424206545a042dd
MD5 ada3179b6f8299932a15d3315f20f037
BLAKE2b-256 3d9dc6bb652111ff0b4cb34c4141267eaa91d8d2d9774617d2a5f424bb8ffa74

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.21-py3-none-win32.whl
Algorithm Hash digest
SHA256 0797c1f51ee8c5db742a69b7d8c2948e8474ddbeeefcea792ab9f70a34890fca
MD5 f337a0e76b15f19763ac7d4e18fdafd3
BLAKE2b-256 035d7b034993b1460ef50426610eeb66126c57782e90480f013e2c5d3d8ed892

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 93e32169381afaf9a2c32ff10b28c8f8e86ec1e0273fb2beb186fdd214ecee32
MD5 15ed2c0b99d8a193cad9f14198d6f524
BLAKE2b-256 c4500681914033a438e1beb5e89a11637f97e6feb1ea4a6f2b87d5a8f1b57cac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 51fd21c2a10ea7a4dc535a83bd2e21650236151671946cf98ed643561648c87b
MD5 9c1f3699a816827aa109019b15d9caae
BLAKE2b-256 fa2fc8043de9ad200d5ccab0ab8001f460f1cb7f1f7e262320345b2bf1244bc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 5012308754f6377f7a2522b50d6ba8bda003f15feb755adbc2ab2353c0b96523
MD5 1f63a7c30bc382c8a8fc0b3f0b713127
BLAKE2b-256 8e38536bbcd74fa5960ae395b345f7655bbd932064d457524a5e8847331ed9d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8d6a1364fe39aeed30fbf3427f6f43a27d8a113e0a9cb42386851cd365e956e4
MD5 e37806f2d1504c02b4d1897f9105a460
BLAKE2b-256 e8235ebfe6f6d0227b35dddeb5f1da621e8fe3eeb49a8bed151f45920b2f3e7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfea37104d3d06134a43fc62038d9c073f5d8ecce2f524bdb60608c43484494c
MD5 927a2964c98e51f4a7bcb648c234a219
BLAKE2b-256 0e8d6613d8c04d16f4b953a5b973219e76a61f80a92a5c17b6b250e1770e4341

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 45e9d63ccdd79f0d24a5e99ff6cd449439a5b1a9b84c5fa1d4a6c9e9b4419c91
MD5 789597ef6ddf5e70047f7fb7069ed0e6
BLAKE2b-256 e3a686b3a9efc6202a4266bbed44b4e3145f758f37b3e52f39e1de115ae1c04f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 91e3e4decfba5ac6e6c11bd9879350c1a140ec952169d4a137c5d1fceea6fb9d
MD5 194594d43db70235fffa99ee52bf1b53
BLAKE2b-256 b523eaed96f06d4fecfebcee6ea4d656e5b06fb61cab58ccc4098526bbca5e8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 48ebc0585f073c83086c1f8a21aeeb8a9f68c361a4989d1fbf24bcae83782a5d
MD5 39f80064611b76c1da5e228cde93fdc2
BLAKE2b-256 381639a8fdb7ec4a65800925895903bdbc2fefda0624a10f3e9f6690e74dd071

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 ef23d2c2e5fa32dc91edfaea22d094a7cecf2a1bb58f5e8cf916e0a4049b9200
MD5 3115adcbc0026e27ee3ab68633061468
BLAKE2b-256 a5ea5b0d2dac76bdcf3f4055a46b7cb6b4271d6db96f00fb5c8eda063189ceb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 306e2b349dd41b177c2157471d99fa6deffae3098b3747ca7a90cbf0a69f44dc
MD5 8c00a0d0130fdb098d88f9b7079aeceb
BLAKE2b-256 4e9891e38332d4db2fe36f782e227238af0b689785cff57b169c92aacd249e21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 7d86149d80b69da65987d1b3f03f5285d13bcf033424d2fdad646efd36f77257
MD5 31ab273446c5f56009a8e89768ccacdb
BLAKE2b-256 244d19913eddd03e1787be2deeb97134210c0d8b92dfb34f26409d51994e5ce1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a62e72cec3596e5dc78ec5077f5d0616c100fcf9758fa5d41e8b3b00335c439e
MD5 43d56254cb67ce27fc98000524957e66
BLAKE2b-256 f707866bebfb01ae04619b335c4981fa11914543f3dfa73bc2c1d7008cf285a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9dd65dea88bd6ad3728aab0b176a83da794f5a7a103a9ee3f0085fb57f030d2f
MD5 f80f761e9c7a9e045caa6364f5bdd343
BLAKE2b-256 0ef5151c1272e4cf902a04345b3ad5ed3cfe91c8780bcbf0bfe25277b4effd84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.21-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 dbcee21780bc9df9e328d6ec2f02e236cdf1483e570cb627945e2f1389875c85
MD5 e406bff9198b685a03e96afb49658003
BLAKE2b-256 fc189abc4463eda4151c8f4e2be82d2c6ea1b6787a79eded84a9c35a7359ea69

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