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.0.tar.gz (3.3 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.7.0-py3-none-win_arm64.whl (17.0 MB view details)

Uploaded Python 3Windows ARM64

uv-0.7.0-py3-none-win_amd64.whl (18.3 MB view details)

Uploaded Python 3Windows x86-64

uv-0.7.0-py3-none-win32.whl (16.9 MB view details)

Uploaded Python 3Windows x86

uv-0.7.0-py3-none-musllinux_1_1_x86_64.whl (17.5 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

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

Uploaded Python 3musllinux: musl 1.1+ i686

uv-0.7.0-py3-none-musllinux_1_1_armv7l.whl (16.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARMv7l

uv-0.7.0-py3-none-manylinux_2_28_aarch64.whl (16.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

uv-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

uv-0.7.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (22.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

uv-0.7.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (17.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

uv-0.7.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (18.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64

uv-0.7.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (17.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

uv-0.7.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (15.9 MB view details)

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

uv-0.7.0-py3-none-macosx_11_0_arm64.whl (15.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

uv-0.7.0-py3-none-macosx_10_12_x86_64.whl (16.7 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

uv-0.7.0-py3-none-linux_armv6l.whl (16.6 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.0.tar.gz
Algorithm Hash digest
SHA256 d117a5f90606badb6c7169b05b9c4cd7c256f1462879d2da5a3328b160ad2510
MD5 da7700266797ba9da115d7a7dea0814b
BLAKE2b-256 c2b8af201fc2c2219b26eea88bb35894ca1cc122f81da98b00aab0d0addffd07

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 d4caa47576c016a96a8534b24e440350b9717bb835998910b9c9d1f125e3aa7c
MD5 eca8651a2e3b4f38e9882894dfd76597
BLAKE2b-256 7ca0102442104f67b23eff7becca52a445b5fbfef1755e994f07cab9aaae965f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 38350bbc0a9b750bc61b28a7609f09285344fe290d867c9b80b86100ddadbc79
MD5 8f0360c5a78f34bbd5c13d146d1118cd
BLAKE2b-256 ec5e5b746c55b35c4a7cf546bd095384c2c864482b91f9fb9407f91bc39c95ae

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 24ef0aca2d3d14cf68d4c9e227e007213eb72a7592494351373fe21d514d3a0a
MD5 d759d23956d0208c9d863100ad704c53
BLAKE2b-256 7bfc489317a92fae694201a7bab0a8ac5cd3973a34b6e6d22f368369fd567cca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3b146028bda2514ce8bc027c26209786d26add59fbe6b1b68e4ea130774ef115
MD5 955d38220af3ecc657de1f3bfaba4633
BLAKE2b-256 6867ee6202655e5afd89e12b92b6ec43695dbf43e8b653db0ca2cf8dee58aa06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uv-0.7.0-py3-none-musllinux_1_1_i686.whl
  • Upload date:
  • Size: 16.7 MB
  • Tags: Python 3, musllinux: musl 1.1+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.17

File hashes

Hashes for uv-0.7.0-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 f8bff3e3121aaa86dee147f9fda54fdfa7649deccc629284326ddf36bf0e6b74
MD5 c757b7540bff0129dbabd6d39f0d443c
BLAKE2b-256 34e1c713851f67b5d51aabdad491c8be61799f37aa57ae97a1a38f82e12320d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 72b984c4960f085ad327903a78fc621f4d304b3a6da871cd40a0a963a2085562
MD5 22d3de540ab56f3e3319e298604cf503
BLAKE2b-256 0b2be7e09614bb6051d3ebb6b6fbb03542a13e3025ebc96d6e4fcfa547e078c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ddf5104908093b5c59cc74b78fb5d41e7c5b33e0bfa7a5f323a92c64706ee2a5
MD5 472f1f2ff3fd05f591de1b777575a5c2
BLAKE2b-256 baf0a27ad5640b40a6bd5e9df94ea27037c121e85f7b6a80b72729c072405a27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 223d0bac3ef9472a3e94178be84f35ff9ed93e170fd6f51d0c3bb5f473f6a17c
MD5 87fc8c44c71f8b09a5e2cf1a15661384
BLAKE2b-256 0994caf3d3c081c92a64939a66e92a4f2cda437e3897a705b5f94776ba2bec3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 257ff44130d279f11b3de13bdec5b89b47e2ec67bf58e4a2868a53330c1b1fad
MD5 e53d7f23778601f8e9635c9fa3274f8e
BLAKE2b-256 f292529a7f56fd2bae0b3b7d04b750a585b58dc375e601726e21336eaddf3cc9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 8e189de87ff6b2d5d2e58544869de6c38b67413c18391a67eb61733844daa4bc
MD5 9601c2ab749ef37a7fc207a85bfc4aab
BLAKE2b-256 38a8e4415f8c354532d65dd022f44f3591bd9b1a98216269b3a389c9407a0cfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 c32b117739761dafeb99a399d15428c87d6f00d84cbe94d419abb341e9429f34
MD5 7579cc8d70a0f9a67e56ff494e542dd8
BLAKE2b-256 81fed83b54622311a4387d8f9a30ad71dbc2f8985a506e1626ce5b8157a2754d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d79278d43cf30b6cf45cc81b6696e264b5e7a8d84648249cc40f8a48418a05e5
MD5 1dd3be8503112691847fbc6697d59a9a
BLAKE2b-256 a35185e0710abd3adb38eca77e1b46376c8f2f50332b21f882ab90260dd7e0df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 21bd60811dd61616380c4cf5f3ef53b83f2e8300f81ea7a4bd1ec6485e3af0ca
MD5 0e43851b27d5c85dae7885415fc98ad2
BLAKE2b-256 17a3a939979b8e0f7b53f43b135a773e382cb27937a6e7424339fb57cb8ef8c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 83e9a7d01770b5bd9e11efc35d7c0640838ee218ee61383473ef7c3169cfd2bb
MD5 46f54b65e56908139aaa0d7107f2359b
BLAKE2b-256 cec1826f08deac9aaa431347f49564f4e139b4a503f81bb8ab0b6082d66d34a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f48eeaeb46a5f81be873c1662c999e78ff267798ecea9dd48c7082e022048ec
MD5 fea76235fef608ac8090e0dc61183d43
BLAKE2b-256 ed1dcad304d6107208fdd90adf5ca519e86a2e35786cb7229d6cd39cf29bec3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b61456f023462b4a1fc6ccf176ab954936c3c07babc3ff632f3c208fccb575f0
MD5 1a006469d2e69464390e818b6d6e80e5
BLAKE2b-256 a472d17c298002dd72b321277a1ac6912e1b3519f61ce72998b4d8e0af8f6843

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.0-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 dc431d96f42d7dea2140516b887907be7f83793f26f043c7c9979d8af5e52d72
MD5 d03c6b65adfd7bafdbbcc0bbd21d54de
BLAKE2b-256 2025e17922bfc87efae1ee624ba49729c6c7d04870e39edab4c297866725e42c

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