Loading…
Loading…
Python · async
FastAPI is the async-first Python option. Generated apps use Pydantic v2 DTOs, SQLAlchemy async sessions, dependency-injection auth, and Uvicorn + gunicorn. The auto-generated OpenAPI schema doubles as live API documentation at /docs.
Every FastAPI app generated by Archiet ships with these baseline pieces. No template-cutting, no placeholder TODOs.
One representative file from a generated FastAPI app. Your generated output will include many more files like this one, customized to the entities and flows in your blueprint.
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from app.deps import get_session, get_current_user
from app.schemas import ItemCreate, ItemOut
router = APIRouter(prefix="/items", tags=["items"])
@router.post("", response_model=ItemOut, status_code=201)
async def create_item(
body: ItemCreate,
db: AsyncSession = Depends(get_session),
user: User = Depends(get_current_user),
) -> ItemOut:
item = Item(**body.model_dump(), owner_id=user.id)
db.add(item)
await db.commit()
return itemPick FastAPI when throughput matters, your team is comfortable with async, or you want automatic OpenAPI documentation without writing a line of schema.