- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 207 for Portal (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/stream_json_lines/tutorial001_py310.py
app = FastAPI() class Item(BaseModel): name: str description: str | None items = [ Item(name="Plumbus", description="A multi-purpose household device."), Item(name="Portal Gun", description="A portal opening device."), Item(name="Meeseeks Box", description="A box that summons a Meeseeks."), ] @app.get("/items/stream") async def stream_items() -> AsyncIterable[Item]: for item in items:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 936 bytes - Click Count (0) -
docs_src/server_sent_events/tutorial001_py310.py
app = FastAPI() class Item(BaseModel): name: str description: str | None items = [ Item(name="Plumbus", description="A multi-purpose household device."), Item(name="Portal Gun", description="A portal opening device."), Item(name="Meeseeks Box", description="A box that summons a Meeseeks."), ] @app.get("/items/stream", response_class=EventSourceResponse) async def sse_items() -> AsyncIterable[Item]:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 1.1K bytes - Click Count (0) -
tests/test_sse.py
class Item(BaseModel): name: str description: str | None = None items = [ Item(name="Plumbus", description="A multi-purpose household device."), Item(name="Portal Gun", description="A portal opening device."), Item(name="Meeseeks Box", description="A box that summons a Meeseeks."), ] app = FastAPI() @app.get("/items/stream", response_class=EventSourceResponse)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 9.8K bytes - Click Count (0) -
docs/zh/docs/tutorial/stream-json-lines.md
在这些场景中,常见的做法是发送 “JSON Lines”,这是一种每行发送一个 JSON 对象的格式。 响应的内容类型是 `application/jsonl`(而不是 `application/json`),响应体类似这样: ```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 对象,彼此以换行符分隔。 /// info | 信息Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:29:48 GMT 2026 - 4.2K bytes - Click Count (0) -
docs/en/docs/tutorial/request-form-models.md
If a client tries to send some extra data, they will receive an **error** response. For example, if the client tries to send the form fields: * `username`: `Rick` * `password`: `Portal Gun` * `extra`: `Mr. Poopybutthole` They will receive an error response telling them that the field `extra` is not allowed: ```json { "detail": [ { "type": "extra_forbidden",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.1K bytes - Click Count (0) -
docs_src/server_sent_events/tutorial002_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float items = [ Item(name="Plumbus", price=32.99), Item(name="Portal Gun", price=999.99), Item(name="Meeseeks Box", price=49.99), ] @app.get("/items/stream", response_class=EventSourceResponse) async def stream_items() -> AsyncIterable[ServerSentEvent]:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 686 bytes - Click Count (0) -
docs/en/docs/tutorial/stream-json-lines.md
```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."} ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.3K bytes - Click Count (0) -
docs_src/server_sent_events/tutorial004_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float items = [ Item(name="Plumbus", price=32.99), Item(name="Portal Gun", price=999.99), Item(name="Meeseeks Box", price=49.99), ] @app.get("/items/stream", response_class=EventSourceResponse) async def stream_items( last_event_id: Annotated[int | None, Header()] = None,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 795 bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/stream-json-lines.md
回應的 content type 會是 `application/jsonl`(而不是 `application/json`),而本體內容會像這樣: ```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 物件,彼此以換行字元分隔。 /// infoCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:33:04 GMT 2026 - 4.2K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/references/streaming.md
name: str price: float @app.get("/items/stream", response_class=EventSourceResponse) async def stream_items() -> AsyncIterable[Item]: yield Item(name="Plumbus", price=32.99) yield Item(name="Portal Gun", price=999.99) ``` For full control over SSE fields (`event`, `id`, `retry`, `comment`), yield `ServerSentEvent` instances: ```python from collections.abc import AsyncIterable from fastapi import FastAPICreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 2.5K bytes - Click Count (0)