- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for fake_db (0.14 sec)
-
docs_src/encoder/tutorial001_py310.py
from fastapi.encoders import jsonable_encoder from pydantic import BaseModel fake_db = {} class Item(BaseModel): title: str timestamp: datetime description: str | None = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 430 bytes - Viewed (0)