Opinionated Python + uv template for new scripts.
- Go to or create the project folder.
- Get the template files:
npx degit github:joaopalmeiro/template-python-uv-script
or
npx degit 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.
- Remove
, TEMPLATE.md
from theREADME.md
file nesting pattern in the .vscode/settings.json file. - Delete the TEMPLATE.md file.
- Delete the
Getting Started
section.
Install pyenv (if necessary).
pyenv install && pyenv versions
pip install uv==0.1.39 && uv --version
uv venv .venv --verbose
source .venv/bin/activate
which python && python --version
uv pip install -r requirements.txt
uv pip list --strict
uv pip check --verbose
ruff check
mypy
ruff check --fix
ruff format
python 01.py
deactivate