Opinionated Python + uv template for new scripts.
- Go to or create the project folder.
- Get the template files:
npx giget github:joaopalmeiro/template-python-uv-script . --force
- Search for
template-python-uv-script
and replace it with the project name. Ignore the template repository URL in the NOTES.md file. - Search for
Opinionated [Python](https://www.python.org/) + [uv](https://github.com/astral-sh/uv) template for new scripts.
and replace it with the (short) project description. - Search for
João Palmeiro
and replace it with the author's name. - Open the requirements.txt file and add the project-specific dependencies.
- Delete the deprecated/ folder and the corresponding configuration in the .vscode/settings.json and ruff.toml files.
- Delete the TEMPLATE.md file.
- Delete the
Getting Started
section.
Install uv (if necessary):
curl -LsSf https://astral.sh/uv/0.6.1/install.sh | sh
uv python install
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
python 01.py
ruff check
mypy
ruff check --fix
ruff format
deactivate