The python-package example is a normal uv package (src layout, pyproject.toml, tests) whose bakefile.py inherits PythonSpace instead of writing tasks from scratch:
What it shows
- Inheriting a Space:
lint, test, setup-dev, tools, update, version, clean, and more arrive preconfigured (ruff, ty, deptry, pytest with coverage, uv).
- Overriding one inherited task.
test reuses the space’s own _test helper with extra_args="-x" to stop at the first failure. No @command() needed, the inherited registration carries over.
- Adding a project-specific task (
build) with @command() as usual.
- A private hook tweak:
_get_mise_tools drops pipx:bakefile[extras=locked] because this project gets bakefile from its own venv (bakefile[lib] in pyproject.toml), so the pipx copy would be redundant.
Try it
For a single-file setup with no project files, see the simple example. Last modified on September 6, 2026