agentsclimarketplace

Fastapi development

Skill ulpi-io/plugin-marketplace/plugins/aj-geddes/skills/fastapi-development

A curated collection of 7,800+ agent skills for Claude Desktop, sourced from skills.sh

Install
npx -y skills add ulpi-io/plugin-marketplace --skill fastapi-development

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Build high-performance FastAPI applications with async routes, validation, dependency injection, security, and automatic API documentation. Use when developing modern Python APIs with async support, automatic OpenAPI documentation, and high performance requirements.

SKILL.md

3.3 KB, as published. Nobody here has run it

FastAPI Development

Table of Contents

Overview

Create fast, modern Python APIs using FastAPI with async/await support, automatic API documentation, type validation using Pydantic, dependency injection, JWT authentication, and SQLAlchemy ORM integration.

When to Use

  • Building high-performance Python REST APIs
  • Creating async API endpoints
  • Implementing automatic OpenAPI/Swagger documentation
  • Leveraging Python type hints for validation
  • Building microservices with async support
  • Integrating Pydantic for data validation

Quick Start

Minimal working example:

# main.py
from fastapi import FastAPI, HTTPException, status
from fastapi.middleware.cors import CORSMiddleware
from contextlib import asynccontextmanager
import logging

# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# Create FastAPI instance
app = FastAPI(
    title="API Service",
    description="A modern FastAPI application",
    version="1.0.0",
    docs_url="/api/docs",
    openapi_url="/api/openapi.json"
)

# Add CORS middleware
app.add_middleware(
    CORSMiddleware,
    allow_origins=["http://localhost:3000"],
    allow_credentials=True,
    allow_methods=["*"],
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
FastAPI Application SetupFastAPI Application Setup
Pydantic Models for ValidationPydantic Models for Validation
Async Database Models and QueriesAsync Database Models and Queries
Security and JWT AuthenticationSecurity and JWT Authentication
Service Layer for Business LogicService Layer for Business Logic
API Routes with Async EndpointsAPI Routes with Async Endpoints

Best Practices

✅ DO

  • Use async/await for I/O operations
  • Leverage Pydantic for validation
  • Use dependency injection for services
  • Implement proper error handling with HTTPException
  • Use type hints for automatic OpenAPI documentation
  • Create service layers for business logic
  • Implement authentication on protected routes
  • Use environment variables for configuration
  • Return appropriate HTTP status codes
  • Document endpoints with docstrings and tags

❌ DON'T

  • Use synchronous database operations
  • Trust user input without validation
  • Store secrets in code
  • Ignore type hints
  • Return database models in responses
  • Implement authentication in route handlers
  • Use mutable default arguments
  • Forget to validate query parameters
  • Expose stack traces in production

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.