- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 782 for asyncio (0.04 sec)
-
tests/test_request_params/test_form/test_required_str.py
# Without aliases @app.post("/required-str", operation_id="required_str") async def read_required_str(p: Annotated[str, Form()]): return {"p": p} class FormModelRequiredStr(BaseModel): p: str @app.post("/model-required-str", operation_id="model_required_str") async def read_model_required_str(p: Annotated[FormModelRequiredStr, Form()]): return {"p": p.p}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.6K bytes - Viewed (0) -
tests/test_request_params/test_header/test_list.py
# Alias @app.get("/required-list-alias") async def read_required_list_alias(p: Annotated[list[str], Header(alias="p_alias")]): return {"p": p} class HeaderModelRequiredListAlias(BaseModel): p: list[str] = Field(alias="p_alias") @app.get("/model-required-list-alias") async def read_model_required_list_alias( p: Annotated[HeaderModelRequiredListAlias, Header()], ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 11K bytes - Viewed (0) -
tests/test_response_class_no_mediatype.py
@app.get( "/a", response_class=Response, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.3K bytes - Viewed (0) -
tests/test_response_model_data_filter.py
name: str owner: UserDB class PetOut(BaseModel): name: str owner: UserBase @app.post("/users/", response_model=UserBase) async def create_user(user: UserCreate): return user @app.get("/pets/{pet_id}", response_model=PetOut) async def read_pet(pet_id: int): user = UserDB( email="******@****.***", hashed_password="secrethashed", )Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/test_request_params/test_header/test_optional_list.py
# Without aliases @app.get("/optional-list-str") async def read_optional_list_str( p: Annotated[Optional[list[str]], Header()] = None, ): return {"p": p} class HeaderModelOptionalListStr(BaseModel): p: Optional[list[str]] = None @app.get("/model-optional-list-str") async def read_model_optional_list_str( p: Annotated[HeaderModelOptionalListStr, Header()], ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.3K bytes - Viewed (0) -
tests/test_response_code_no_body.py
@app.get( "/a", status_code=204, response_class=JsonApiResponse, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass @app.get("/b", responses={204: {"description": "No Content"}}) async def b(): pass # pragma: no cover client = TestClient(app) def test_get_response(): response = client.get("/a")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_request_params/test_file/test_list.py
# Without aliases @app.post("/list-bytes", operation_id="list_bytes") async def read_list_bytes(p: Annotated[list[bytes], File()]): return {"file_size": [len(file) for file in p]} @app.post("/list-uploadfile", operation_id="list_uploadfile") async def read_list_uploadfile(p: Annotated[list[UploadFile], File()]): return {"file_size": [file.size for file in p]}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 11.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/index.md
/// ## `async`にするかどうか 依存関係は **FastAPI**(*path operation関数*と同じ)からも呼び出されるため、関数を定義する際にも同じルールが適用されます。 `async def`や通常の`def`を使用することができます。 また、通常の`def`*path operation関数*の中に`async def`を入れて依存関係を宣言したり、`async def`*path operation関数*の中に`def`を入れて依存関係を宣言したりすることなどができます。 それは重要ではありません。**FastAPI** は何をすべきかを知っています。 /// note | 備考
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 9.6K bytes - Viewed (0) -
docs_src/custom_response/tutorial007_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 277 bytes - Viewed (0) -
docs_src/events/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 283 bytes - Viewed (0)