Create a Python Project Using uv and Manage Dependencies
Create a Python Project
This command automatically creates the following project structure inside the pyprojects folder:
pyproject.toml Content
Run the Entry Script
Install Dependencies
Add the latest requests package to pyproject.toml:
This updates the file as follows:
Upgrade a package:
Remove a package:
Add Development Dependencies
This creates a [dependency-groups] section in pyproject.toml:
Add Dependencies from requirements.txt
List Packages in the Virtual Environment
Lock and Sync
Generate a lock file:
Synchronize the environment with the lock file: