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

This version

0.7.3

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

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3Windows x86

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

Uploaded Python 3musllinux: musl 1.1+ x86-64

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

Uploaded Python 3musllinux: musl 1.1+ i686

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

Uploaded Python 3musllinux: musl 1.1+ ARMv7l

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

Uploaded Python 3manylinux: glibc 2.28+ ARM64

uv-0.7.3-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.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (22.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ s390x

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

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

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

Uploaded Python 3manylinux: glibc 2.17+ ppc64

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

Uploaded Python 3manylinux: glibc 2.17+ i686

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

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

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

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

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

Uploaded Python 3macOS 11.0+ ARM64

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

Uploaded Python 3macOS 10.12+ x86-64

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: uv-0.7.3.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.2

File hashes

Hashes for uv-0.7.3.tar.gz
Algorithm Hash digest
SHA256 863ceb63aefc7c2db9918313a1cb3c8bf3fc3d59b656b617db9e4abad90373f3
MD5 88855ea0ed97769eff77bf21eb107ea2
BLAKE2b-256 779e4ea6d224f868badecd48b8fed17f83adb0ff62f75bc21785d91dee75c744

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uv-0.7.3-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.7.2

File hashes

Hashes for uv-0.7.3-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 cb2547fd1466698e9b4f11de5eef7055b8cbcc3c693d79f6d747e3f8e6be2ab7
MD5 6e4504feab83d3382f70ebdba7c3c5ff
BLAKE2b-256 471b7ca1b8ec4bcf1c807f61e6ced7ca704791843cf1297db5edb54db07bd1db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uv-0.7.3-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.7.2

File hashes

Hashes for uv-0.7.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0a446d4e5b10ce8a793156a276727bb7affa96a85e80dc5ad34e0c2de7e71cc8
MD5 6004bccf7134c377b4546993d27c21ed
BLAKE2b-256 641bc9f0ad7c75bf0a04c52c7e766593f5e79b1ac7d97fa1cb34c6ce0cfe3746

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uv-0.7.3-py3-none-win32.whl
Algorithm Hash digest
SHA256 44e2f3fcbd1ab519bdb68986449b2e3103d2261be95f985cadcf7ec7c510b595
MD5 db90dcf6ee5f2a965239729a9fcb6dcf
BLAKE2b-256 6a971138bb26038805a14d930c7261faf363a5256757390b4be0aaf6e33a41c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0646e463365e7277f22200ce2d43b7a44e5a3192320500b4983b4fe34d69a5fb
MD5 569f9989541e0f7f2fdf7dfb0bb846f4
BLAKE2b-256 a973385a5a55fccfebac84a88b629992e301c080640691f2e27a3e3ccee8315e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 5eb4872888a9fb10b62cc00be8e84822d63d3e622a5f340248e53ecf321dba96
MD5 eea844949091a45a3561f7e518fa765a
BLAKE2b-256 749107f7e68f08e617d27ae9908a4e8deb756368b942319634956ed92d7cf35c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 cc27207c35c959d2e0e873e86a80a2470a77b7a34a4512a831e8d4f7c87f4404
MD5 1207a6c864c0a9815646f97c2e8106da
BLAKE2b-256 015c99ef96ca53c74552b616bd341cd5d298bc8a603151343c409efeaf1552a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c976fce3d1068a1d007f50127cc7873d67643c1a60439564970f092d9be41877
MD5 9a47d8dac30a6f86c8c4b2ecafa48170
BLAKE2b-256 09aeccd123274ae59707e84fc5542776f89887818bad915167fbaeda65ebf52a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1414a026c153ae0731daed0812b17bf77d34eafedaeb3a5c72e08181aea116b
MD5 93c9ef4714b9fefd29ad89e9a0e4a8eb
BLAKE2b-256 f1b18af4ea6d09d05b9edead5e701dd91e04d55971483a7a644bab7a979bb46b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 fbb2d322d453e498e1431c51421cee597962ecd3f93fcef853b258e9c7e7636c
MD5 a28fa98673368c4a584f3ab77180cba4
BLAKE2b-256 275e2e9172ec3fa8acfa69642900d6eee8e5021f6c14d135edef524c674b4cfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 acff7fba5ff40dcb5a42de496db92a3965edac7a3d687d9b013ba6e0336995df
MD5 f4f97eed4b3ed01e8d2fbfa2c8027875
BLAKE2b-256 daaff7165a205ce8bb5e00f197d86a6fce4b4a317db0e471a31db9137ca1cc2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 4809e5f7f5b2d6423d6573fda5655389c955ca649499fe9750b61af95daf9b7d
MD5 dd39e9f6162c00a25bd7edee078fd117
BLAKE2b-256 a58adc46e79f5fd068cb841a716a96f0344af62cf2deb2e78f57e0e147de26ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 90990e4c289feee24164c8e463fc0ebc9a336960119cd256acca7c1439f0f536
MD5 5f2089aea5e290ab9b8328b201c83f0f
BLAKE2b-256 ad662fe8ec6e5390de4cfc6db312464b4f28e5b3d98d576adc42731c0aeb5073

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 acef117a0c52299e60c6f7a3e60849050cd233704c561f688fac1100d113da2e
MD5 41dfc39cad0d8e8624ca31533ee0bd87
BLAKE2b-256 e6331acf89318fb987a6eb9989a6991b76b6c930b6a724ce5f1ed848519d6a5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 d246243f348796730e8ea9736ddd48702d4448d98af5e61693063ed616e30378
MD5 dc62eed5977ac3a93dcc9757c3288d5b
BLAKE2b-256 6939cba47262d9547695657885391b34e8732cb0c34b5b876b811851cd320f3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db8a5d5995b160158405379deadf0ffccf849a5e7ce048900b73517daf109e2c
MD5 a733dd651c446070df41102dff65735d
BLAKE2b-256 df1b50922bfbe1631d022e0c6434ade17158b9b4e0bb7fccc77c928e32dd9021

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3e6e1fd5755d4ef4c6e1ce55bd2c6d9dec278a8bef5752703d702ce03704fe29
MD5 641b494d1bab70751838d1767342615b
BLAKE2b-256 bade794ea8c9729784c7626f05a98fe91b8367587f57f023cb95adcd8f8a9215

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uv-0.7.3-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 f37c8a6b172776fb5305afe0699907aff44a778669de7a8fbe5a9c09c1a88a97
MD5 03ec31176d118f0c0be72729493d4910
BLAKE2b-256 e48b09a9d9da09d90ec6829dc4b3e9b7ff99222b7f05bc5d292bc30b04b92209

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