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 inituvwill automatically create avenvand auv.lockfile when we run auvcommand now, so run something likeuv run main.pyto 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
We can install local packages with something like:
uv pip install path/to/my/package
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 minorwhere we can use major, minor, patch, etc. to update the version