
Python Backend
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-codeInstalls 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
- Async-first - Use async/await for I/O operations
- Type everything - Pydantic models for validation
- Dependency injection - Use FastAPI's Depends()
- Fail fast - Validate early, use HTTPException
- 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