- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for Lyding (0.17 sec)
-
docs_src/header_params/tutorial002.py
from typing import Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items( strange_header: Union[str, None] = Header(default=None, convert_underscores=False), ):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 260 bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial002.py
from typing import List, Union from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None app = FastAPI(separate_input_output_schemas=False) @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> List[Item]: return [ Item( name="Portal Gun",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 524 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str = Field(examples=["Foo"]) description: Union[str, None] = Field(default=None, examples=["A very nice Item"]) price: float = Field(examples=[35.4]) tax: Union[float, None] = Field(default=None, examples=[3.2]) @app.put("/items/{item_id}")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 517 bytes - Viewed (0)