Starting a new Python project usually involves rebuilding the same scaffolding: dependency management, test setup, linting, typing, and repository conventions.
This template standardises that bootstrap process using uv and
baker, so a new project starts with a working development loop from
day one.
Generated projects include:
pytestandpytest-watcherfor fast feedbackrufffor lintingpyrightfor static type checking- optional Jupyter support
- initialises a
gitrepository using local git author configuration
The goal is to reduce setup friction and encourage a consistent, test-first workflow.
This repository is a project template consumed by baker, a language-agnostic scaffolding tool. baker collects the project parameters, renders the template, and runs hooks to initialise the project directory.
-
Jupyter is an interactive Python shell. Its notebook version is implemented as a web server, which makes it possible to present images and many other desirable features. You can run Jupyter notebook with
uv run jupyter notebook. -
pytest-watcher is a test runner that runs tests each time a
*.pyfile is changed in the project. You can configure it to run in response to other file extensions too. Just add something like[tool.pytest-watcher] patterns = ["*.py", "*.csv", "*.json"]
to
pyproject.tomland it will run the tests when you change JSON or CSV files too.You can run pytest-watcher with
uv run ptw ..
-
Baker: A command-line tool that helps you quickly scaffold new projects. It is implemented in Rust, but is language-agnostic. You can create projects and write scripts to help scaffolding in any language. The main templating engine uses Mini Jinja.
-
git: This template creates an empty git in the project directory. It also defaults the project author and email to the ones defined in the global git config.
-
bash: The hooks in the present template are written as Bash scripts.
-
jq: We use jq to read variables from the template engine context to our hooks.
-
uv: This template will create Python project scaffolding with the uv package manager. uv is implemented in Rust.
You can either use a template from your local host or point to a repository in the web:
$ git clone https://github.com/pasunboneleve/baker-uv-template
$ baker ./baker-uv-template <my-project-directory>
or
$ baker https://github.com/pasunboneleve/baker-uv-template <my-project-directory>