This is a solid reference for FastAPI projects that covers the stuff you actually need in production. It handles async SQLAlchemy patterns, JWT and OAuth2 auth flows, and Upstash integrations for Redis caching and QStash background jobs. The rate limiting implementation uses sliding windows, which is the right approach. What makes this useful is the focus on refactoring AI-generated Python code, since that's often where backend patterns fall apart. If you're building APIs with FastAPI and want to avoid reinventing authentication, database transactions, or caching patterns, this gives you working examples. It assumes you know Python but need the glue code between FastAPI, SQLAlchemy, and modern tooling.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
7
skills.sh installs
2.2K
GitHub stars
10
last updated
Aug 21, 2026

Install

$ npx -y skills add jiatastic/open-python-skills --skill python-backend --agent claude-code

Installs into .claude/skills of the current project.

Files

python-backend

Production-ready Python backend patterns for FastAPI, SQLAlchemy, and Upstash.

When to Use This Skill

  • Building REST APIs with FastAPI
  • Implementing JWT/OAuth2 authentication
  • Setting up SQLAlchemy async databases
  • Integrating Redis/Upstash caching and rate limiting
  • Refactoring AI-generated Python code
  • Designing API patterns and project structure

Core Principles

  1. Async-first - Use async/await for I/O operations
  2. Type everything - Pydantic models for validation
  3. Dependency injection - Use FastAPI's Depends()
  4. Fail fast - Validate early, use HTTPException
  5. Security by default - Never trust user input

Quick Patterns

Project Structure

src/
├── auth/
│   ├── router.py      # endpoints
│   ├── schemas.py     # pydantic models
│   ├── models.py      # db models
│   ├── service.py     # business logic
│   └── dependencies.py
├── posts/
│   └── ...
├── config.py
├── database.py
└── main.py

Async Routes

# BAD - blocks event loop
@router.get("/")
async def bad():
    time.sleep(10)  # Blocking!

# GOOD - runs in threadpool
@router.get("/")
def good():
    time.sleep(10)  # OK in sync function

Sponsors

Details

Repository
github.com/jiatastic/open-python-skills
Categories
Backend & APIs, Security, Code Review & Quality, AI & Agent Building, Debugging, Python, Databases
1redis avatarredis-semantic-cacheredis/agent-skillsRedis LangCache guidance for semantic caching of LLM responses on Redis Cloud — calling search/set via the SDK or REST API, tuning the similarity threshold, sep2Kskills.sh installs
2cognitedata avatarsetup-flows-authcognitedata/builder-skillsMUST be used when migrating an existing React app to Flows, or when no Flows auth is wired up. Detects classic vs Apps API flow from `app.json` `infra` field, i1.9Kskills.sh installs
3kotlin avatarkotlin-backend-jpa-entity-mappingkotlin/kotlin-agent-skillsModel Kotlin persistence code correctly for Spring Data JPA and Hibernate. Covers entity design, identity and equality, uniqueness constraints, relationships, f1.8Kskills.sh installs
4alirezarezvani avatarsenior-backendalirezarezvani/claude-skillsDesigns and implements backend systems including REST APIs, microservices, database architectures, authentication flows, and security hardening. Use when the us1.7Kskills.sh installs
5alchemyplatform avataralchemy-apialchemyplatform/skillsWire Alchemy into application code (server, backend, dApp, script) using a standard API key. Preferred app-integration path for normal server/backend usage. Cov1.7Kskills.sh installs
6jezweb avatard1-drizzle-schemajezweb/claude-skillsGenerate Drizzle ORM schemas for Cloudflare D1 databases with correct D1-specific patterns. Produces schema files, migration commands, type exports, and DATABAS1.7Kskills.sh installs