- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 1,638 for item2 (0.04 sec)
-
tests/test_tutorial/test_handling_errors/test_tutorial005.py
"paths": { "/items/": { "post": { "summary": "Create Item", "operationId": "create_item_items__post", "requestBody": { "content": { "application/json": { "schema": {"$ref": "#/components/schemas/Item"} }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0) -
docs_src/response_model/tutorial001_py39.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: list[str] = [] @app.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=list[Item]) async def read_items() -> Any: return [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 556 bytes - Viewed (0) -
tests/test_extra_routes.py
return {"item_id": item_id, "item": item} @app.head("/items/{item_id}") def head_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.options("/items/{item_id}") def options_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.patch("/items/{item_id}") def patch_item(item_id: str, item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 13.7K bytes - Viewed (0) -
tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py
response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}}) assert response.status_code == 200 assert response.json() == { "item_id": 5, "item": {"name": "Foo", "price": 3.0, "description": None, "tax": None}, } @needs_py310 def test_items_6(client: TestClient): response = client.put( "/items/6", json={ "item": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.3K bytes - Viewed (0) -
docs_src/response_model/tutorial001_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list[str] = [] @app.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=list[Item]) async def read_items() -> Any: return [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 537 bytes - Viewed (0) -
docs_src/response_model/tutorial001.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: List[str] = [] @app.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=List[Item]) async def read_items() -> Any: return [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 562 bytes - Viewed (1) -
buildscripts/heal-manual.go
fmt.Println("Healstatus on items ===") for _, item := range status.Items { if err = enc.Encode(&item); err != nil { log.Fatalln(err) } } break } if status.Summary == "stopped" { fmt.Println("Healstatus on items ===") fmt.Println("Heal failed with", status.FailureDetail) break } for _, item := range status.Items { if err = enc.Encode(&item); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 27 09:47:58 UTC 2024 - 2.3K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py310/main.py
raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db: raise HTTPException(status_code=409, detail="Item already exists") fake_db[item.id] = item
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.1K bytes - Viewed (0) -
docs_src/generate_clients/tutorial001_py39.py
from pydantic import BaseModel 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 [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 04 22:02:18 UTC 2022 - 494 bytes - Viewed (0)