- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 760 for asyncio (0.08 sec)
-
tests/test_response_model_default_factory.py
@app.get( "/response_model_has_default_factory_return_dict", response_model=ResponseModel, ) async def response_model_has_default_factory_return_dict(): return {"code": 200} @app.get( "/response_model_has_default_factory_return_model", response_model=ResponseModel, ) async def response_model_has_default_factory_return_model(): return ResponseModel() client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 18:51:40 UTC 2025 - 1.2K bytes - Viewed (0) -
docs_src/path_params/tutorial003_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 236 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/de/docs/tutorial/request-files.md
* `close()`: Schließt die Datei. Da alle diese Methoden `async`hron sind, müssen Sie sie „await“en („erwarten“). Zum Beispiel können Sie innerhalb einer `async` *Pfadoperation-Funktion* den Inhalt wie folgt auslesen: ```Python contents = await myfile.read() ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 15:10:09 UTC 2025 - 8.7K bytes - Viewed (0) -
docs_src/body_updates/tutorial002_py310.py
"baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.patch("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): stored_item_data = items[item_id] stored_item_model = Item(**stored_item_data)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1022 bytes - Viewed (0) -
docs_src/request_files/tutorial001_03_py39.py
from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: bytes = File(description="A file read as bytes")): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file( file: UploadFile = File(description="A file read as UploadFile"), ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 371 bytes - Viewed (0) -
docs_src/request_files/tutorial001_an_py39.py
from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes, File()]): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 322 bytes - Viewed (0) -
tests/test_request_param_model_by_alias.py
class Model(BaseModel): param: str = Field(alias="param_alias") @app.get("/query") async def query_model(data: Model = Query()): return {"param": data.param} @app.get("/header") async def header_model(data: Model = Header()): return {"param": data.param} @app.get("/cookie") async def cookie_model(data: Model = Cookie()): return {"param": data.param}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 2.1K bytes - Viewed (0) -
docs/de/docs/advanced/dataclasses.md
8. Beachten Sie, dass diese *Pfadoperation-Funktion* reguläres `def` anstelle von `async def` verwendet. Wie immer können Sie in FastAPI `def` und `async def` beliebig kombinieren. Wenn Sie eine Auffrischung darüber benötigen, wann welche Anwendung sinnvoll ist, lesen Sie den Abschnitt „In Eile?“ in der Dokumentation zu [`async` und `await`](../async.md#in-a-hurry){.internal-link target=_blank}.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
8. Notice that this *path operation function* uses regular `def` instead of `async def`. As always, in FastAPI you can combine `def` and `async def` as needed. If you need a refresher about when to use which, check out the section _"In a hurry?"_ in the docs about [`async` and `await`](../async.md#in-a-hurry){.internal-link target=_blank}.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.2K bytes - Viewed (0)