UV videos
UV Crash Course
Create a new project with UV
UV cheatsheet
Use UV in Production - Simple Docker Setup
Introduction
<aside>
💡
UV can be seen as an alternative to pip, virtualenv or poetry, but that might be a limiting way to think about the tool. Instead of looking at faster builds, which are still super nice, it might also make sense to rethink the stuff that we might be able to do from Python going forward.
</aside>
UV is a relatively new tool in the Python ecosystem, designed to be a faster and more efficient alternative to pip, the standard package manager for Python. Here are some key points about uv:
- Speed: uv is built for performance. It's written in Rust and is significantly faster than pip for many operations, especially on larger projects.
- Compatibility: uv aims to be a drop-in replacement for pip. It can read and write pip-compatible requirements files and lock files.
- Features:
- Can install packages from PyPI, Git repositories, and local directories
- Supports creating and managing virtual environments
- Can generate lock files for reproducible builds
- Offers a build mode for compiling Python packages with native extensions
- Caching: uv implements aggressive caching to speed up repeated operations.
- Dependency resolution: It uses a modern solver for fast and correct dependency resolution.
- Security: uv includes features like checksum verification of downloaded packages.
- Platform support: It works on Linux, macOS, and Windows.
- Integration: While it can be used standalone, uv can also integrate with other Python tools like poetry and PDM.
uv is still relatively new in the Python ecosystem, so it's continually evolving. Its main appeal is its speed and efficiency, which can be particularly beneficial for data scientists working with complex environments or on CI/CD pipelines where fast package installation is crucial.