uv is an innovative Python package and project manager developed by Astral, the creators of Ruff. Built in Rust, it offers remarkable speed improvements—10 to 100 times faster than traditional pip—while consolidating functionalities from multiple tools such as pip, pip-tools, pipx, poetry, pyenv, twine, and virtualenv into a single, efficient solution.
Key Features:
- Blazing Fast: Leveraging Rust's performance, uv dramatically reduces package resolution and installation times.
- Unified Toolset: Replaces several Python tools with a single, comprehensive manager.
- Project Management: Supports universal lockfiles, Cargo-style workspaces, and script execution with inline dependency metadata.
- Python Version Management: Installs and manages multiple Python versions seamlessly.
- Tool Execution: Runs and installs command-line tools from Python packages, similar to pipx.
- Disk Efficiency: Uses a global cache for dependency deduplication, saving disk space.
- Cross-Platform: Works on macOS, Linux, and Windows, with standalone installers available.
- Pip Compatibility: Offers a pip-compatible interface for familiar usage with enhanced performance.
Installation: uv can be installed via standalone installers or PyPI: ```bash
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 via pip/pipx
pip install uv pipx install uv ```
Usage Examples:
- Project Initialization:
uv init example
- Dependency Management:
uv add ruff
- Script Execution:
uv run example.py
- Tool Installation:
uv tool install ruff
- Python Version Management:
uv python install 3.10 3.11 3.12
uv is designed for scalability, efficiency, and ease of use, making it an ideal choice for modern Python development workflows. Its advanced features, such as dependency version overrides and platform-independent resolutions, further enhance its utility. Explore the documentation to get started.