Skip to content

matscarrgard/python-boilerplate

Repository files navigation

Python Boilerplate

Python project boilerplate for use with PRP methodology.

This is not meant to be used directly. Use /init-project from the prp-methodology to pull this boilerplate into your project.

What's Included

Project Structure

src/app/
├── core/           # Config, logging, exceptions, database
├── backend/        # FastAPI routers, services, models (scaffolded)
└── frontend/       # FastHTML components (scaffolded)

tests/
├── unit/
└── integration/

Pattern Documentation

  • docs/guides/fastapi-patterns.md
  • docs/guides/sqlalchemy-patterns.md
  • docs/guides/fasthtml-patterns.md
  • docs/guides/htmx-patterns.md
  • docs/guides/testing-patterns.md

Commands

  • /scaffold - Create project structure (api-only, web-only, etc.)

Architecture Patterns

Pattern Use Case Stack
core-only Library, scripts Pydantic, loguru
cli-app CLI tool + Typer
api-only REST API + FastAPI
web-only Web app + FastHTML
api-web Both + FastAPI + FastHTML

Usage

This boilerplate is pulled automatically by /init-project:

# 1. Create empty project with methodology
mkdir my-project && cd my-project
git init
git remote add prp-method https://github.com/matscarrgard/prp-methodology.git
git subtree add --prefix=.prp prp-method main --squash

# 2. Start Claude and run init
claude
/init-project

# 3. When prompted, choose "Python" to pull this boilerplate

# 4. Scaffold your project structure
/scaffold api-only

Tech Stack

  • Python 3.13+
  • Pydantic v2 - Validation
  • loguru - Logging
  • FastAPI - REST API (optional)
  • FastHTML - Web UI (optional)
  • SQLAlchemy 2.0 - Database (optional)
  • Typer - CLI (optional)
  • ruff - Linting
  • pytest - Testing
  • uv - Package management

License

MIT

About

Python project boilerplate for PRP methodology

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors