---
description: Python API development — FastAPI, Flask, or Django REST. Used for high-performance async APIs or when leveraging Python's ML/data ecosystem.
---

# /python-api — Python API Development

$ARGUMENTS

---


## 🤖 Agent Activation

> **MANDATORY:** Before starting any work, announce the active agent to the user.

```
🤖 **Active Agent: `python-api-developer`** | Skills: `clean-code, python-patterns, api-patterns, database-design +1 more`
```

## Task

Build Python APIs with FastAPI, Flask, or Django REST Framework.

### Framework Selection:

| Need | Choose |
|------|--------|
| Max performance + async + auto-docs | FastAPI |
| Rapid prototyping + flexibility | Flask |
| Full CRUD + admin + auth built-in | Django REST |

### FastAPI Steps:

1. **Setup**
   - FastAPI + Uvicorn
   - Pydantic models
   - Async database (SQLAlchemy 2.0)

2. **Structure**
   - Routers (versions)
   - Dependencies (DB, auth)
   - Services (business logic)
   - Schemas (Pydantic)

3. **Features**
   - Automatic OpenAPI docs
   - Dependency injection
   - Background tasks
   - WebSockets

---

## Usage Examples

```
/python-api build FastAPI CRUD with PostgreSQL
/python-api setup async SQLAlchemy
/python-api create Flask REST API
/python-api implement JWT with FastAPI
/python-api add ML model endpoint
/python-api create Django REST serializer
```
