Skip to main content

An extremely fast Python package and project manager, written in Rust.

Project description

Image for: Project description

uv

An extremely fast Python package and project manager, written in Rust.

Installing Trio's dependencies with a warm cache.

Highlights

Image for: Highlights

uv is backed by Astral, the creators of Ruff.

Installation

Image for: 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

Image for: Documentation

uv's documentation is available at docs.astral.sh/uv.

Additionally, the command line reference documentation can be viewed with uv help.

Features

Image for: 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

Image for: Platform support

See uv's platform support document.

Versioning policy

Image for: Versioning policy

See uv's versioning policy document.

Contributing

Image for: 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

Image for: 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

Image for: 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

Image for: 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

Image for: Project details

Release history Release notifications | RSS feed

Image for: Release history Release notifications | RSS feed

Download files

Image for: 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.12.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

uv-0.7.12-py3-none-win_arm64.whl (17.5 MB view details)

Uploaded Python 3 Windows ARM64

uv-0.7.12-py3-none-win_amd64.whl (18.8 MB view details)

Uploaded Python 3 Windows x86-64

uv-0.7.12-py3-none-win32.whl (17.3 MB view details)

Uploaded Python 3 Windows x86

uv-0.7.12-py3-none-musllinux_1_1_x86_64.whl (17.9 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

uv-0.7.12-py3-none-musllinux_1_1_i686.whl (17.1 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

uv-0.7.12-py3-none-musllinux_1_1_armv7l.whl (16.7 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

uv-0.7.12-py3-none-manylinux_2_28_aarch64.whl (16.6 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ ARM64

uv-0.7.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

uv-0.7.12-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl (18.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ s390x

uv-0.7.12-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (18.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64le

uv-0.7.12-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (18.4 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ppc64

uv-0.7.12-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (17.6 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

uv-0.7.12-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (16.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

uv-0.7.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (16.3 MB view details)

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

uv-0.7.12-py3-none-macosx_11_0_arm64.whl (15.8 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

uv-0.7.12-py3-none-macosx_10_12_x86_64.whl (17.1 MB view details)

Uploaded Python 3 macOS 10.12+ x86-64

uv-0.7.12-py3-none-linux_armv6l.whl (17.0 MB view details)

Uploaded Python 3

File details

Image for: File details

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

File metadata

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

File hashes

Hashes for uv-0.7.12.tar.gz
Algorithm Hash digest
SHA256 4aa152e6a70d5662ca66a918f697bf8fb710f391068aa7d04e032af2edebb095
MD5 6b6b70bae47e3f31b1d2fa8b935d25c2
BLAKE2b-256 6735360a4aa325254b7f11d0898d30588861428659011b34f1e19c40fdd15db6

See more details on using hashes here.

File details

Image for: File details

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

File metadata

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

File hashes

Hashes for uv-0.7.12-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 8aba24e12ded2f2974a2f213e55daabf78002613d3772c1396fc924c6682cd27
MD5 c96ffb6d468bba0648ee860dbac5c2b8
BLAKE2b-256 8e354800ff7bc1663d9f967eabc8440074f906c8a98ea28d1aae66d2d19b7ae9

See more details on using hashes here.

File details

Image for: File details

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

File metadata

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

File hashes

Hashes for uv-0.7.12-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 bb57bd26becd86194788f832af373b6ba431314fa0f6f7e904c90cac1818a7dc
MD5 104cda2f7e43bdbbf48be6547d14e6bc
BLAKE2b-256 089ec52c7f50280e57110ca79b6805877f50514d9a777d31a683a4eb1de52312

See more details on using hashes here.

File details

Image for: File details

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

File metadata

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

File hashes

Hashes for uv-0.7.12-py3-none-win32.whl
Algorithm Hash digest
SHA256 6008abf92c8d37060944377d89bf9f514aa18370391d9d63dc7d449dac94aca1
MD5 3fbd4dccf8b72a7a2333805cfec71ddc
BLAKE2b-256 1509e476187c0a1da78b9c2021f3c3ab31ed2469a70d222bde5dc892236b3c4f

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 4c697ef9d9f6b6f42df5a661efa8a745c0e4c330039d45b549b2ca7e7b66f8a5
MD5 cdbd2c764405511376146c92b4b644b7
BLAKE2b-256 dad8673591f34f897aa4216144a513e60c2004399155c47e7b550612960359c6

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 01310c45d55f6e7580124c9b1f7e3586b9609c4f8e5a78558a75951b03541bb2
MD5 886680929b44a06038d70d90363c40ca
BLAKE2b-256 b3a5b0432a25eaa23e9f909649321784b8e4be4579e9957eb5d369aa30c79164

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 85e8d3dea95016a45ed8c48343f98734d1b5c4be7bba26257d4c8873059646fa
MD5 4b9a6434e338e5d3c787025b196655e1
BLAKE2b-256 d4d66fe3b16390472a9d31dd1e0e7e3759b884d71e8a0dff1baf4a753b4adaaa

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8a7ed9e94ec409bfc7181ee274d1b0ed6292698a20df0ae035ce422224863af5
MD5 ddbfab440ba947c9daa116d516ea1334
BLAKE2b-256 9278608163b35ffaf1054cd10197646b6336e7be7b6a51dfef6d98a91600c6be

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e34b4ad4288828210c2e075934009903514ca97bd603aced7d0755040b4d0489
MD5 1a86c63a3d6a4c20205dc242b333e4f3
BLAKE2b-256 bcaefcfd916cbc109c5626dc25b208395b47ba12b27af82f3bb8e247b4e95692

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 e0672dc5dc1b0ae7191d11ecae8bb794c7e860936b66c2bc3855bd0dee17fca1
MD5 496db167872e5c271e5bc1f053366d66
BLAKE2b-256 a64adb21a5d3839771799af2df366cc5ed0933ebe9fc9e920f212e33dc00136e

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 7e0ba7767b21d58d65703c3cd43814ccfe06d7664ac42b3589d5f2b72486b903
MD5 94e9d7f6bf117d133a0069add8e5cd58
BLAKE2b-256 9523f62bab13f67ed785f7ad01546c499809d1db71b03f94950380f0bc407625

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 1557a154d2c36030ff0b707f3c2bfafd977e54fcd4d628dd0fa8a265449e9f13
MD5 8e4b491d707e0c75410d309e5f819344
BLAKE2b-256 d4a8b5be1c67c7894caf178e850903ac25f465e3508a6eada2ae735b187dc39d

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0fa630d865111c26f26c5e6f4547a73b13284f098471a4ca982d7b0caf0e658b
MD5 c8610f64d57851549c85029afb73ed04
BLAKE2b-256 9bd6868fb3f0b9f2a0d2f14cb8079171b862adbd782e47e0469dad3d3d71c938

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 14214a51e0ae0f0e8dbcac35a29722c45dbf40d0fd37309897642f7989af6caf
MD5 5f635cbf58caced1527999b709c403e0
BLAKE2b-256 b7863503eb869fa17d607cc296a6514db52ec73c2ec85ad608952a207fd2e8ff

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 bb47326b9c4802db28e11f1aab174d5c9c0a8b26ed0a83094d3882dd8f5049ad
MD5 ac5c3bc738375828074b5e1a5db07277
BLAKE2b-256 0beb605d8f1d08606024209d0e31c3799c696199a887260ee1db52663e4da2e8

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e70a4393fd6a09b056e1ac500fe2b796d26c30783194868c6801ea08c3bbf863
MD5 c5bb141d58c0158ee0308afbfa1c25e7
BLAKE2b-256 b9a90f27e16e161f98240a328b5201b8abf178b751fde4fc56c54c1321812cd5

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 02e67c5f9d141fb25976cddb28abceaf715412ed83070cb9b87c5c488c8451af
MD5 6bced6db0adfba4a7d6b41139a445ec2
BLAKE2b-256 43aaf42707faa13a9c1b4f662456b2dca4bde169eb921f135319d8856c6e5e8e

See more details on using hashes here.

File details

Image for: File details

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

File metadata

File hashes

Hashes for uv-0.7.12-py3-none-linux_armv6l.whl
Algorithm Hash digest
SHA256 81824caf5756ffee54b4c937d92d7c8c224c416270c90a83b9b4a973f6e4e559
MD5 ec253cb43d12c12756a80f0dd6d7bab1
BLAKE2b-256 f864ee9f1b27f006c49a6765e9655ab93e7c8cbd6f0bf8b731f30f608b0be9fd

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