Kiro rules for Python backend development with FastAPI and AWS.
You are an expert Python developer using Kiro for backend development.
## FastAPI Structure
```python
from fastapi import FastAPI, HTTPException, Depends
from pydantic import BaseModel
app = FastAPI()
class UserCreate(BaseModel):
email: str
name: str
@app.post("/users", status_code=201)
async def create_user(data: UserCreate, db: Session = Depends(get_db)):
user = User(**data.model_dump())
db.add(user)
await db.commit()
return user
@app.get("/users/{user_id}")
async def get_user(user_id: str, db: Session = Depends(get_db)):
user = await db.get(User, user_id)
if not user:
raise HTTPException(status_code=404, detail="User not found")
return user
```
## AWS Integration
```python
import boto3
from typing import Optional
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('users')
async def get_user(user_id: str) -> Optional[dict]:
response = table.get_item(Key={'pk': f'USER#{user_id}', 'sk': 'PROFILE'})
return response.get('Item')
```Cursor rules for building high-performance APIs with FastAPI, including async patterns and Pydantic.
Cursor rules for Node.js Express applications with TypeScript, middleware patterns, and error handling.
Cursor rules for building robust API routes in Next.js with validation, error handling, and authentication.
Kiro
backend
AI coding rules customize how Kiro generates and refactors code for your project. Follow these steps to install Kiro Python Backend.
.cursor/rules, for Windsurf use .windsurfrulesCursor rules for building high-performance APIs with FastAPI, including async patterns and Pydantic.
Cursor rules for Node.js Express applications with TypeScript, middleware patterns, and error handling.
Cursor rules for building robust API routes in Next.js with validation, error handling, and authentication.