mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-12 10:58:11 -04:00
* ✨ Implement support for Pydantic's ORM mode * 🏗️ Re-structure/augment SQL tutorial source using ORM mode * 📝 Update SQL docs with SQLAlchemy, ORM mode, relationships * 🔥 Remove unused util in tutorial * 📝 Add tutorials for simple dict bodies and responses * 🔥 Remove old SQL tutorial * ✅ Add/update tests for SQL tutorial * ✅ Add tests for simple dicts (body and response) * 🐛 Fix cloning field from original field
11 lines
179 B
Python
11 lines
179 B
Python
from typing import Dict
|
|
|
|
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.post("/index-weights/")
|
|
async def create_index_weights(weights: Dict[int, float]):
|
|
return weights
|