Build production-ready FastAPI applications using best practices for project structure, async patterns, Pydantic models, dependency injection, database operations, and testing. Ideal for developing FastAPI backends, REST APIs, or Python async web services.
Use this skill when:
Organize projects by domain rather than file type for better scalability:
fastapi-project/
├── app/
│ ├── schemas/ # data structure and constraints
│ ├── models/ # schema with behavior
│ ├── managers/ # domain orchestrator
│ ├── exceptions/ # business exception
│ ├── routes/ # domain orchestrator
│ ├── settings.py # application global settings
│ ├── engine.py # database engine
├── utils/
├── libs/
├── tests/
│ ├── conftest.py
│ ├── <by_domain>/test_<xxx>.py
├── migrations/
├── scripts/
├── docs/
├── .env
├── .env.example
├── logging.ini
├── pyproject.toml
└── run.py # FastAPI app
File Templates:
Notes:
app/ folderschemas/, models/, managers/, routes/) is organized by domain
app/schemas/posts.py, app/managers/posts_manager.py, app/routes/posts.pyRead revelant references before you really start your task:
ruff check --fix src
ruff format src
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer