from fastapi import APIRouter, HTTPException users = [] # In-memory storage router = APIRouter() @router.post("/login") async def get_username( username: str = "demo" ): """Get username endpoint""" user = next((u for u in users if u["username"] == username), None) if not user: raise HTTPException(status_code=400, detail="Username not found") return { "message": "Username retrieved", "user": username, "features": { "rate_limit": 100, "expires_in": 3600 } }