Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jiatastic avatar

Python Backend

  • 2k installs
  • 7 repo stars
  • Updated January 25, 2026
  • jiatastic/open-python-skills

python-backend is an agent skill that >.

About

Production ready Python backend patterns for FastAPI SQLAlchemy and Upstash 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 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 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 python BAD blocks event loop router get async def bad time sleep 10 Blocking The python backend agent skill provides documented workflows prerequisites triggers and safety guidance from its SKILL md source Agents load it when user requests match the description and follow step by step instructions without inventing capabilities It integrates with standard agent tooling for the tasks inputs outputs and failure

  • Python backend development expertise for FastAPI, security patterns, database operations,
  • Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI,
  • (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases,
  • Follow python-backend SKILL.md steps and documented constraints.
  • Follow python-backend SKILL.md steps and documented constraints.

Python Backend by the numbers

  • 1,968 all-time installs (skills.sh)
  • +52 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #629 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

python-backend capabilities & compatibility

Capabilities
python backend development expertise for fastapi · upstash integrations, and code quality. use when · (2) implementing jwt/oauth2 authentication, (3) · follow python backend skill.md steps and documen
Use cases
orchestration
From the docs

What python-backend says it does

Python backend development expertise for FastAPI, security patterns, database operations,
SKILL.md
Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI,
SKILL.md
(2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases,
SKILL.md
npx skills add https://github.com/jiatastic/open-python-skills --skill python-backend

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2k
repo stars7
Security audit3 / 3 scanners passed
Last updatedJanuary 25, 2026
Repositoryjiatastic/open-python-skills

When should an agent use python-backend and what problem does it solve?

>

Who is it for?

Developers invoking python-backend as documented in the skill source.

Skip if: Skip when requirements fall outside python-backend documented scope.

When should I use this skill?

>

What you get

Outputs aligned with the python-backend SKILL.md workflow and stated deliverables.

  • Async database session setup
  • Auth and migration patterns

By the numbers

  • Bundles 4 reference documents in references/
  • Documents postgresql+asyncpg async engine and session patterns

Files

SKILL.mdMarkdownGitHub ↗

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

# BEST - non-blocking
@router.get("/")
async def best():
    await asyncio.sleep(10)  # Non-blocking

Pydantic Validation

from pydantic import BaseModel, EmailStr, Field

class UserCreate(BaseModel):
    email: EmailStr
    username: str = Field(min_length=3, max_length=50, pattern="^[a-zA-Z0-9_]+$")
    age: int = Field(ge=18)

Dependency Injection

async def get_current_user(token: str = Depends(oauth2_scheme)) -> User:
    payload = decode_token(token)
    user = await get_user(payload["sub"])
    if not user:
        raise HTTPException(401, "User not found")
    return user

@router.get("/me")
async def get_me(user: User = Depends(get_current_user)):
    return user

SQLAlchemy Async

from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine

engine = create_async_engine(DATABASE_URL, pool_pre_ping=True)
SessionLocal = async_sessionmaker(engine, expire_on_commit=False)

async def get_session() -> AsyncGenerator[AsyncSession, None]:
    async with SessionLocal() as session:
        yield session

Redis Caching

from upstash_redis import Redis

redis = Redis.from_env()

@app.get("/data/{id}")
def get_data(id: str):
    cached = redis.get(f"data:{id}")
    if cached:
        return cached
    data = fetch_from_db(id)
    redis.setex(f"data:{id}", 600, data)
    return data

Rate Limiting

from upstash_ratelimit import Ratelimit, SlidingWindow

ratelimit = Ratelimit(
    redis=Redis.from_env(),
    limiter=SlidingWindow(max_requests=10, window=60),
)

@app.get("/api/resource")
def protected(request: Request):
    result = ratelimit.limit(request.client.host)
    if not result.allowed:
        raise HTTPException(429, "Rate limit exceeded")
    return {"data": "..."}

Reference Documents

For detailed patterns, see:

DocumentContent
references/fastapi_patterns.mdProject structure, async, Pydantic, dependencies, testing
references/security_patterns.mdJWT, OAuth2, password hashing, CORS, API keys
references/database_patterns.mdSQLAlchemy async, transactions, eager loading, migrations
references/upstash_patterns.mdRedis, rate limiting, QStash background jobs

Resources

Related skills

Forks & variants (1)

Python Backend has 1 known copy in the catalog totaling 0 installs. They canonicalize to this original listing.

How it compares

Pick python-backend over generic Python snippets when you need FastAPI plus async SQLAlchemy, Alembic, and Upstash patterns in one reference bundle.

FAQ

What is python-backend?

>

When should I use python-backend?

>

Is python-backend safe to install?

Review the Security Audits panel on this page before production use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.