- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 462 for Portal (0.07 sec)
-
docs_src/dependencies/tutorial008b_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 775 bytes - Viewed (0) -
docs_src/bigger_applications/app_py39/routers/items.py
prefix="/items", tags=["items"], dependencies=[Depends(get_token_header)], responses={404: {"description": "Not found"}}, ) fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}} @router.get("/") async def read_items(): return fake_items_db @router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1011 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_py39.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 735 bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial001_py310.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 451 bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial002_py310.py
@app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item( name="Portal Gun", description="Device to travel through the multi-rick-verse", ), Item(name="Plumbus"),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 486 bytes - Viewed (0) -
docs_src/response_model/tutorial001_01_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 507 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial002b_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 323 bytes - Viewed (0) -
docs_src/generate_clients/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Mar 04 22:02:18 UTC 2022 - 494 bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 483 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b.py
assert response.json() == {"detail": "Owner error: Rick"} def test_get_item(client: TestClient): response = client.get("/items/portal-gun") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0)