- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 36 for create_item (0.06 seconds)
-
docs_src/response_status_code/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 145 bytes - Click Count (0) -
docs_src/strict_content_type/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Feb 23 17:45:20 GMT 2026 - 231 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial006_py310.py
"description": {"type": "string"}, }, } } }, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() data = magic_data_reader(raw_body)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", tags=["items"]) async def create_item(item: Item) -> Item: return item @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 524 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial004_py310.py
class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", summary="Create an item") async def create_item(item: Item) -> Item: """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: required
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 625 bytes - Click Count (0) -
docs_src/app_testing/app_b_py310/main.py
if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/") async def create_item(item: Item, x_token: str = Header()) -> Item: if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 13:32:24 GMT 2026 - 1.1K bytes - Click Count (0) -
docs_src/response_status_code/tutorial002_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 173 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 350 bytes - Click Count (0) -
docs_src/generate_clients/tutorial001_py310.py
app = FastAPI() class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str @app.post("/items/", response_model=ResponseMessage) async def create_item(item: Item): return {"message": "item received"} @app.get("/items/", response_model=list[Item]) async def get_items(): return [ {"name": "Plumbus", "price": 3},
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 494 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial003_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 457 bytes - Click Count (0)