fastapi-templates

Community

Launch FastAPI projects fast. Build robust APIs.

AuthorTheopsguide
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides production-ready FastAPI project structures, solving the challenge of setting up new API projects with best practices from scratch. It ensures your applications are built with async patterns, proper dependency injection, and comprehensive error handling, saving development time and reducing boilerplate.

Core Features & Use Cases

  • Structured Project Layout: Get a clear, scalable directory structure for your FastAPI applications.
  • Dependency Injection: Leverage FastAPI's powerful DI for database sessions, authentication, and services.
  • Async Patterns: Implement high-performance I/O-bound operations with async/await for databases and external APIs.
  • CRUD Repository & Service Layers: Separate data access from business logic for maintainable code.
  • Use Case: Quickly scaffold a new REST API for a mobile application, complete with user authentication, database integration, and a clean, testable codebase.

Quick Start

Example: main.py for FastAPI App

from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from contextlib import asynccontextmanager

@asynccontextmanager async def lifespan(app: FastAPI): await database.connect() yield await database.disconnect()

app = FastAPI(title="API Template", lifespan=lifespan) app.add_middleware( CORSMiddleware, allow_origins=[""], allow_credentials=True, allow_methods=[""], allow_headers=["*"], ) from app.api.v1.router import api_router app.include_router(api_router, prefix="/api/v1")

Dependency Matrix

Required Modules

fastapiuvicornpydanticsqlalchemyasyncpgpython-josepasslibhttpx

Components

assetsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: fastapi-templates
Download link: https://github.com/Theopsguide/claude-agents/archive/main.zip#fastapi-templates

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository