fastapi/docs_src/body_nested_models/tutorial009_py39.py

9 lines
154 B
Python

from fastapi import FastAPI
app = FastAPI()
@app.post("/index-weights/")
async def create_index_weights(weights: dict[int, float]):
return weights