uv is a python package and project manager, written in Rust. It’s really fast and, from my limited usage, feels really good.
Project Workflow
To create a new project:
- Create the directory for the project, navigate there, and initialize the project with
uv init
, e.g.:
mkdir my-project
cd my-project
uv init
uv
will automatically create avenv
and auv.lock
file when we run auv
command now, so run something likeuv run main.py
to create the venv.- Activate the virtual environment (in Windows, this is via something like
.venv\Scripts\Activate.ps1
)
Then, install packages as appropriate, via:
uv add package-name
, e.g. uv add polars
Versions
uv
also provides tooling for versioning
You can check the version of your project with uv version
And you can bump versions with:
uv version --bump minor
where we can use major
, minor
, patch
, etc. to update the version