- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 159 for fdef (0.01 sec)
-
docs/ko/docs/advanced/async-tests.md
앞에서 작성한 테스트 함수에서 비동기 함수를 호출하고 싶다면, 테스트 코드도 비동기 함수여야합니다. AnyIO는 특정 테스트 함수를 비동기 함수로 호출 할 수 있는 깔끔한 플러그인을 제공합니다. ## HTTPX **FastAPI** 애플리케이션이 `async def` 대신 `def` 키워드로 선언된 함수를 사용하더라도, 내부적으로는 여전히 `비동기` 애플리케이션입니다. `TestClient`는 pytest 표준을 사용하여 비동기 FastAPI 애플리케이션을 일반적인 `def` 테스트 함수 내에서 호출할 수 있도록 내부에서 마술을 부립니다. 하지만 이 마술은 비동기 함수 내부에서 사용할 때는 더 이상 작동하지 않습니다. 테스트를 비동기로 실행하면, 더 이상 테스트 함수 내부에서 `TestClient`를 사용할 수 없습니다.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Tue Dec 10 11:03:16 UTC 2024 - 4.7K bytes - Viewed (0) -
docs/tr/docs/index.md
app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Ya da <code>async def</code>...</summary> Eğer kodunuzda `async` / `await` varsa, `async def` kullanalım: ```Python hl_lines="9 14"
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 21.9K bytes - Viewed (0) -
ci/official/utilities/extract_resultstore_links.py
BAZEL_COMMAND_RE = re.compile( r'(^| )(?P<command>bazel (.*? )?(?P<type>test|build) .+)') class InvokeStatus: tests_failed = 'tests_failed' build_failed = 'build_failed' passed = 'passed' def parse_args() -> argparse.Namespace: """Parses the commandline args.""" parser = argparse.ArgumentParser( description='Extracts ResultStore links from a build log.\n'
Registered: Tue Sep 09 12:39:10 UTC 2025 - Last Modified: Wed Nov 08 17:50:27 UTC 2023 - 10.9K bytes - Viewed (0) -
docs/em/docs/index.md
app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>⚖️ ⚙️ <code>async def</code>...</summary> 🚥 👆 📟 ⚙️ `async` / `await`, ⚙️ `async def`: ```Python hl_lines="9 14" from typing import Union
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 17.1K bytes - Viewed (0) -
docs/he/docs/index.md
app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>או השתמשו ב - <code>async def</code>...</summary> אם הקוד שלכם משתמש ב - `async` / `await`, השתמשו ב - `async def`: ```Python hl_lines="9 14"
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 21.2K bytes - Viewed (0) -
docs/en/docs/index.md
app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Or use <code>async def</code>...</summary> If your code uses `async` / `await`, use `async def`: ```Python hl_lines="9 14"
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 21.3K bytes - Viewed (0) -
docs/en/docs/reference/status.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 871 bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/index.md
Você pode utilizar `async def` ou apenas `def`. E você pode declarar dependências utilizando `async def` dentro de *funções de operação de rota* definidas com `def`, ou declarar dependências com `def` e utilizar dentro de *funções de operação de rota* definidas com `async def`, etc. Não faz diferença. O **FastAPI** sabe o que fazer. /// note | Nota
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 10.3K bytes - Viewed (0) -
docs/en/docs/tutorial/background-tasks.md
It is just a standard function that can receive parameters. It can be an `async def` or normal `def` function, **FastAPI** will know how to handle it correctly. In this case, the task function will write to a file (simulating sending an email). And as the write operation doesn't use `async` and `await`, we define the function with normal `def`: {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 4.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/background-tasks.md
É apenas uma função padrão que pode receber parâmetros. Pode ser uma função `async def` ou `def` normal, o **FastAPI** saberá como lidar com isso corretamente. Nesse caso, a função de tarefa gravará em um arquivo (simulando o envio de um e-mail). E como a operação de gravação não usa `async` e `await`, definimos a função com `def` normal: {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Nov 10 17:23:38 UTC 2024 - 5.1K bytes - Viewed (0)