skillfed

python-fastapi

python-fastapi guides you through architecting enterprise-grade FastAPI applications with proven patterns for project layout, schema validation, dependency injection, and authentication. It covers async database integration with SQLAlchemy, JWT security, Docker containerization, and testing strategies to ensure your API runs reliably in production.

python-fastapi provides templates and patterns for building production-ready FastAPI applications with scalable structure.

AI-generated summary based on this skill's SKILL.md

49 10 MIT updated by JosiahSiegel

Install

JosiahSiegel/claude-plugin-marketplace/python-fastapi · repository language: Shell

git clone https://github.com/JosiahSiegel/claude-plugin-marketplace
cp -r claude-plugin-marketplace/plugins/python-master/skills/python-fastapi ~/.claude/skills/python-fastapi
npx skillfed install JosiahSiegel/claude-plugin-marketplace/python-fastapi

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I build a production FastAPI app with scalable structure?

python-fastapi teaches you to organize your application with a modular folder structure separating routers, schemas, dependencies, and database layers. The guide emphasizes dependency injection for clean code, Pydantic schemas for input/output validation, and async SQLAlchemy for database operations. You'll learn to implement JWT authentication, error handling middleware, and rate limiting to create a robust, maintainable codebase ready for enterprise use.

What's the best way to set up FastAPI project structure?

python-fastapi recommends organizing your project into logical modules: separate directories for routers (API endpoints), schemas (Pydantic models), dependencies (shared logic), database configuration, and utilities. This structure scales as your application grows, making it easier to test, maintain, and collaborate. The guide shows how to use dependency injection to wire components together and keep concerns isolated.

How do I implement JWT authentication in FastAPI?

python-fastapi covers implementing JWT authentication through dependency injection. You'll create token generation endpoints, validate tokens on protected routes using FastAPI's security schemes, and extract the current user from claims. The guide includes password hashing with bcrypt, token refresh patterns, and best practices for securing sensitive endpoints while maintaining clean, testable code.

Can python-fastapi help with async database and SQLAlchemy?

Yes. python-fastapi guides you through integrating async SQLAlchemy for non-blocking database operations, essential for production performance. You'll learn to configure async sessions, write async CRUD operations, and handle database errors gracefully. The guide covers connection pooling, transaction management, and patterns for dependency-injected database access across your API routes.

How should I deploy FastAPI with Docker, Gunicorn, and Uvicorn?

python-fastapi provides deployment patterns using Docker containers with Gunicorn as the process manager and Uvicorn workers for handling concurrent requests. You'll learn to write production-ready Dockerfiles, configure worker counts, set environment variables, and optimize for scalability. The guide includes health check endpoints, graceful shutdown handling, and monitoring considerations for reliable production deployments.

What error handling and rate limiting patterns does python-fastapi cover?

python-fastapi teaches custom exception handlers for consistent API error responses, middleware for cross-cutting concerns, and rate limiting setup to protect endpoints from abuse. You'll implement proper HTTP status codes, structured error messages, and logging strategies. The guide also covers testing with httpx, CORS middleware configuration, and lifespan events for startup/shutdown logic.

SKILL.md

rendered from the published skill — quoted content, verbatim

Quick Reference

Layer File Purpose
Entrypoint main.py App factory, lifespan
Config config.py pydantic-settings
Routes api/v1/endpoints/ Endpoint handlers
Schemas schemas/ Pydantic models
Models models/ SQLAlchemy models
Services services/ Business logic
Deps api/deps.py Dependency injection
Pydantic Pattern Use Case
UserCreate Input for creation
UserUpdate Input for updates
UserResponse API output
UserInDB Internal with hash
Dependency Code
DB

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
plugins/python-master/skills/python-fastapi/SKILL.md
plugins/python-master/skills/python-fastapi/references/dependency-injection-patterns.md

Related skills

Tags

web-framework api-development async-programming orm-integration token-auth containerization request-validation production-ready rest-api