- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 467 for Portal (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/response_model/tutorial003_02_py310.py
from fastapi.responses import JSONResponse, RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Response: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 381 bytes - Click Count (0) -
docs_src/behind_a_proxy/tutorial001_01_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/") def read_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 122 bytes - Click Count (0) -
tests/test_route_scope.py
def test_websocket(): with client.websocket_connect("/items/portal-gun") as websocket: data = websocket.receive_json() assert data == {"item_id": "portal-gun", "path": "/items/{item_id}"} def test_websocket_invalid_path_doesnt_match(): with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/itemsx/portal-gun"):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.5K bytes - Click Count (0) -
docs/ko/docs/tutorial/stream-json-lines.md
응답의 콘텐츠 타입은 `application/json` 대신 `application/jsonl`이고, 본문은 다음과 같습니다: ```json {"name": "Plumbus", "description": "A multi-purpose household device."} {"name": "Portal Gun", "description": "A portal opening device."} {"name": "Meeseeks Box", "description": "A box that summons a Meeseeks."} ``` JSON 배열(Python의 list에 해당)과 매우 비슷하지만, 항목들을 `[]`로 감싸고 항목 사이에 `,`를 넣는 대신, 줄마다 하나의 JSON 객체가 있고, 새 줄 문자로 구분됩니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:56:39 GMT 2026 - 4.8K bytes - Click Count (0) -
docs_src/dependencies/tutorial012_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 696 bytes - Click Count (0) -
docs_src/dependencies/tutorial008b_an_py310.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:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 775 bytes - Click Count (0) -
docs_src/dependencies/tutorial008d_py310.py
raise @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 694 bytes - Click Count (0) -
docs_src/dependencies/tutorial008d_an_py310.py
raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 734 bytes - Click Count (0) -
docs_src/dependencies/tutorial008c_py310.py
print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 660 bytes - Click Count (0) -
docs_src/dependencies/tutorial008c_an_py310.py
print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 700 bytes - Click Count (0)