- Sort Score
- Num 10 results
- Language All
Results 131 - 140 of 807 for itemId (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/generate_clients/tutorial002_py310.py
app = FastAPI() class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str class User(BaseModel): username: str email: str @app.post("/items/", response_model=ResponseMessage, tags=["items"]) async def create_item(item: Item): return {"message": "Item received"} @app.get("/items/", response_model=list[Item], tags=["items"])
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 730 bytes - Click Count (0) -
docs_src/generate_clients/tutorial003_py310.py
class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str class User(BaseModel): username: str email: str @app.post("/items/", response_model=ResponseMessage, tags=["items"]) async def create_item(item: Item): return {"message": "Item received"} @app.get("/items/", response_model=list[Item], tags=["items"])Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 914 bytes - Click Count (0) -
docs_src/response_model/tutorial006_py310.py
}, } @app.get( "/items/{item_id}/name", response_model=Item, response_model_include=["name", "description"], ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude=["tax"]) async def read_item_public_data(item_id: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 816 bytes - Click Count (0) -
docs_src/dataclasses_/tutorial003_py310.py
@dataclass class Item: name: str description: str | None = None @dataclass class Author: name: str items: list[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: list[Item]): # (5)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.3K bytes - Click Count (0) -
docs/tr/docs/tutorial/bigger-applications.md
/// ## `APIRouter` ile Başka Bir Module { #another-module-with-apirouter } Diyelim ki uygulamanızdaki "items" ile ilgili endpoint'ler de `app/routers/items.py` module’ünde olsun. Şunlar için *path operation*’larınız var: * `/items/` * `/items/{item_id}` Bu, `app/routers/users.py` ile aynı yapıdadır. Ancak biraz daha akıllı davranıp kodu sadeleştirmek istiyoruz.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 20.3K bytes - Click Count (0) -
tests/test_route_scope.py
route: APIRoute = request.scope["route"] return {"user_id": user_id, "path": route.path} @app.websocket("/items/{item_id}") async def websocket_item(item_id: str, websocket: WebSocket): route: APIWebSocketRoute = websocket.scope["route"] await websocket.accept() await websocket.send_json({"item_id": item_id, "path": route.path}) client = TestClient(app) def test_get():
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_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(
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_src/dependencies/tutorial008c_py310.py
@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( status_code=404, detail="Item not found, there's only a plumbus here" )
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/uk/docs/tutorial/bigger-applications.md
Припустімо, у вас також є кінцеві точки для обробки «items» у модулі `app/routers/items.py`. У вас є *операції шляху* для: * `/items/` * `/items/{item_id}` Структура така сама, як у `app/routers/users.py`. Але ми хочемо бути розумнішими й трохи спростити код. Ми знаємо, що всі *операції шляху* в цьому модулі мають однакові: * Префікс шляху `prefix`: `/items`. * `tags`: (лише одна мітка: `items`).Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 27.4K bytes - Click Count (0) -
docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py
from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: str | None = None size: float class ItemV2(BaseModelV2): name: str description: str | None = None size: float app = FastAPI() @app.post("/items/", response_model=ItemV2) async def create_item(item: Item):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Oct 11 16:45:54 GMT 2025 - 407 bytes - Click Count (0)