By Bernat Sampera 1 min read Follow:

UV: Create a python app with pyproject.toml

UV is much faster and really easy to use, this is why it has gained a lot of adoption this last year. This intro explains briefly how to quickly set up a project with it

If you also find the whole requirements.txt kind of annoying, uv handle it much more similarly to npm. Here is how to create a project with it.

Step 1: Create the repo

uv init

This will create the following

.git - directory to handle repo
.gitignore - ignore files that shouldn’t be commited
.python-version - specifies the version of python being used
main.py - entry point of the app (You can change this)
pyproject.toml - Handles the dependencies and basic repo information(like package.json in npm)
Readme.md - …

Step 2: Create a virtual environment

uv venv # this creates a .venv directory where the dependencies will be stored
source .venv/bin/activate # To activate this virtual environment

Let's connect !!

Get in touch if you want updates, examples, and insights on how AI agents, Langchain and more are evolving and where they’re going next.