Uv
uv is a Python project manager. It consolidates functionality of many different tools into 1 convenient CLI. The tool is written in Rust, and is extremely fast. It uses a custom dependency solver so dependency search/install from Pypi is faster, too.
The tool handles the following (and more):
- Project initialization
- The
uv initcommand initializes a directory path for developing Python programs. - It has
--appand--liboptions, scaffolding the directory for developing an app or library. - You can use the
--bareoption to create only apyproject.tomlfile, which tracks the project’s build configuration & dependencies, but does not create any project scaffolding. uvcan also manage individual scripts with the--scriptoption.- Initializes a single
.pyfile, adding a docstring at the top of the file in accordance with PEP 723 - Inline script metadata.
- Initializes a single
- The
- Virtual environments
- When you run a
uvcommand, a.venv/directoy is created automatically. - Whenever you run a command prefixed with
uv, i.e.uv python main.py, the tool will use the virtual environment’s Python/Pip.
- When you run a
- Manage your Python install, allowing you to install multiple versions scoped to individual
uv-managed projects. - Manage your project dependencies.
- Can also install dev depenencies, which are available locally during development but are not packaged with the app.
uvxruns a tool in an isolated environment, i.e.uvx ruff, without installing it or adding it to the project.- You can install tools to the system with
uv tool install <tool-name>.
- You can install tools to the system with
Last updated on