fastapi-endpoint

Featured

Plan and build production-ready FastAPI endpoints with async SQLAlchemy, Pydantic v2 models, dependency injection for auth, and pytest tests. Uses interview-driven planning to clarify data models, authentication method, pagination strategy, and caching before writing any code.

API & Backend 33,961 stars 4034 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# FastAPI Endpoint Builder ## When to use Use this skill when you need to: - Add new API endpoints to an existing FastAPI project - Build CRUD operations with proper validation and error handling - Set up authenticated endpoints with dependency injection - Create async database queries with SQLAlchemy 2.0 - Generate complete test coverage for API routes ## Phase 1: Explore (Plan Mode) Enter plan mode. Before writing any code, explore the existing project to understand: ### Project structure - Find the FastAPI app entry point (`main.py`, `app.py`, or `app/__init__.py`) - Identify the router organization pattern (single file vs `routers/` directory) - Check for existing `models/`, `schemas/`, `crud/`, or `services/` directories - Look at `pyproject.toml` or `requirements.txt` for installed dependencies ### Existing patterns - How are existing endpoints structured? (function-based vs class-based) - What ORM is used? (SQLAlchemy 2.0 async, Tortoise, raw SQL, none) - How is the database session managed? (`Depends(get_db)`, middleware, other) - What auth pattern exists? (OAuth2PasswordBearer, API key header, custom) - Are there existing Pydantic base models or shared schemas? - What response format is standard? (direct model, wrapped `{"data": ..., "meta": ...}`) ### Test patterns - Where do tests live? (`tests/`, `test_*.py`, `*_test.py`) - What test client is used? (httpx AsyncClient, TestClient, pytest-asyncio) - Are there test fixtures for database and auth? ## Phase 2...

Details

Author
davila7
Repository
davila7/claude-code-templates
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category