- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for fdef (0.02 sec)
-
docs/de/docs/advanced/async-tests.md
## HTTPX Auch wenn Ihre **FastAPI**-Anwendung normale `def`-Funktionen anstelle von `async def` verwendet, handelt es sich darunter immer noch um eine `async`hrone Anwendung.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:34:47 UTC 2024 - 4.3K bytes - Viewed (0) -
docs/en/docs/advanced/async-tests.md
## HTTPX Even if your **FastAPI** application uses normal `def` functions instead of `async def`, it is still an `async` application underneath.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:43:29 UTC 2024 - 3.8K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
You can use `async def` or normal `def`. And you can declare dependencies with `async def` inside of normal `def` *path operation functions*, or `def` dependencies inside of `async def` *path operation functions*, etc. It doesn't matter. **FastAPI** will know what to do. /// note
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 11:18:17 UTC 2024 - 9.2K bytes - Viewed (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/ProtoLogger.java
this.err = new PrintWriter(toPsOrDef(err, System.err), true); } private PrintStream toPsOrDef(OutputStream outputStream, PrintStream def) { if (outputStream == null) { return def; } if (outputStream instanceof PrintStream ps) { return ps; } return new PrintStream(outputStream); } //
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 2.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] *} ## Add the background task
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:22:48 UTC 2024 - 4.8K bytes - Viewed (0) -
README.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 Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Oct 31 09:13:26 UTC 2024 - 23.6K bytes - Viewed (0) -
compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
} private static String getMessage(Throwable error, String def) { if (error == null) { return def; } String msg = error.getMessage(); if (msg != null && !msg.isEmpty()) { return msg; } return getMessage(error.getCause(), def); } private ArtifactRepositoryLayout getLayout(String id) {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 31.6K bytes - Viewed (0) -
docs/en/docs/tutorial/first-steps.md
It will be called by **FastAPI** whenever it receives a request to the URL "`/`" using a `GET` operation. In this case, it is an `async` function. --- You could also define it as a normal function instead of `async def`: {* ../../docs_src/first_steps/tutorial003.py hl[7] *} /// note If you don't know the difference, check the [Async: *"In a hurry?"*](../async.md#in-a-hurry){.internal-link target=_blank}. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 11:48:16 UTC 2024 - 11.8K bytes - Viewed (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/Init.java
.add(); } listPromptBuilder.addPrompt(); } else if (field.getDefaultValue().isPresent()) { // input w/ def value promptBuilder .createInputPrompt() .name(fieldKey) .message(fieldDescription)
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 12.1K bytes - Viewed (0) -
docs/en/docs/release-notes.md
```Python def get_current_user(token: str): # authenticate user return User() @app.get("/items/") def read_items(user: User = Depends(get_current_user)): ... @app.post("/items/") def create_item(*, user: User = Depends(get_current_user), item: Item): ... @app.get("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:25:57 UTC 2024 - 460.3K bytes - Viewed (0)