python-project-setup
Python project setup guide. Use when creating a new Python project, configuring uv, setting up pyproject.toml, or bootstrapping a FastAPI service.
SKILL.mdskills/python-standards/project-setup/SKILL.md
GitHubPython Project Setup
New Project Checklist
uv init --package my-project- Set
.python-versionto>= 3.12 - Configure
pyproject.toml(seereferences/pyproject.template.toml) - Create
src/{package}/layout - Set up
tests/withconftest.py - Add CI checks for
ruff format,ruff check,ty check
Rules
- Must use
uvfor package management - Must use
src/layout with package name matching project - Must use lifespan for FastAPI startup/shutdown (not
@app.on_event) - Must add health check endpoint at
/health - Must use
pydantic-settingswith.envfile support for config - Must validate all environment variables at startup (fail fast)
- Never use
os.getenv()directly—always go through settings model - Should use versioned routers (
/api/v1/)
See references/pyproject.template.toml for full project configuration.
See references/fastapi-bootstrap.md for minimal working FastAPI app.