UV

uv is the tool to answer all of your prayers when it comes to python, package management in python, and virtual environment creation and management with regards to python.

To create a new python project simply run:

uv init <project name>

This will create a new directory of the name you specified or add files to the directory if it already exists. In this directory will be a pyproject.toml, a uv.lock, a .python-version, and a main.py.

To add packages to this project simply run:

uv add <package>

This will add the package to your virtual environment as well as add it to your uv.lock and pyproject.toml. The uv.lock is a drop in replacement for pip's requirements.txt standard.

To run a project that uses uv you can simply run:

uv run <python file>

It is also important to note that if a virtual environment isn't already created running uv run will also create and use the newly created virtual environment. The run command will also download all dependencies required for the project as specified in the pyproject.toml.

This page was last updated: 2025-07-22 Tue 11:01. Source