New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Backend patterns for FastAPI, async SQLAlchemy, JWT auth, and Upstash caching, rate limiting, and background jobs.

skills.sh installs
2.2K
GitHub stars
10
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers FastAPI project layout, async routes, Pydantic validation, dependency injection, and testing patterns
  • Includes reference guides for security (JWT, OAuth2, password hashing, CORS, API keys), database (transactions, eager loading, migrations), and Upstash (Redis, rate limiting, QStash)
  • Enforces async-first I/O, typed Pydantic models, and validate-early error handling with HTTPException
  • Designed for Python teams building production REST APIs, or cleaning up AI-generated Python code

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/jiatastic/open-python-skills
Categories
Backend & APIs, Python

Similar to Python Backend

More Backend & APIs