- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for blocks (0.2 sec)
-
docs/de/docs/advanced/events.md
```Python async with lifespan(app): await do_stuff() ``` Wenn Sie wie oben einen Kontextmanager oder einen asynchronen Kontextmanager erstellen, führt dieser vor dem Betreten des `with`-Blocks den Code vor dem `yield` aus, und nach dem Verlassen des `with`-Blocks wird er den Code nach dem `yield` ausführen. In unserem obigen Codebeispiel verwenden wir ihn nicht direkt, sondern übergeben ihn an FastAPI, damit es ihn verwenden kann.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:30:59 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/de/docs/how-to/custom-request-and-route.md
Wir können denselben Ansatz auch verwenden, um in einem Exceptionhandler auf den Requestbody zuzugreifen. Alles, was wir tun müssen, ist, den Request innerhalb eines `try`/`except`-Blocks zu handhaben: ```Python hl_lines="13 15" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:18:23 GMT 2024 - 5.2K bytes - Viewed (0) -
docs/en/docs/tutorial/index.md
It is also built to work as a future reference. So you can come back and see exactly what you need. ## Run the code All the code blocks can be copied and used directly (they are actually tested Python files). To run any of the examples, copy the code to a file `main.py`, and start `fastapi dev` with: <div class="termy"> ```console
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 5.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/index.md
Ele também foi feito como referência futura. Então você poderá voltar e ver exatamente o que precisar. ## Rode o código Todos os blocos de código podem ser copiados e utilizados diretamente (eles são, na verdade, arquivos Python testados). Para rodar qualquer um dos exemplos, copie o codigo para um arquivo `main.py`, e inicie o `uvivorn` com:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 2.8K bytes - Viewed (0) -
README.md
<a href="https://github.com/deepset-ai/haystack/" target="_blank" title="Build powerful search from composable, open source building blocks"><img src="https://fastapi.tiangolo.com/img/sponsors/haystack-fastapi.svg"></a> <a href="https://databento.com/" target="_blank" title="Pay as you go for market data"><img src="https://fastapi.tiangolo.com/img/sponsors/databento.svg"></a>
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 22.6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
```Python async def do_something(): try: yield something finally: some_cleanup() ``` ...that way the `finally` block is run regardless of any exception that might happen. ### Features
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1) -
docs/en/docs/how-to/custom-request-and-route.md
We can also use this same approach to access the request body in an exception handler. All we need to do is handle the request inside a `try`/`except` block: ```Python hl_lines="13 15" {!../../../docs_src/custom_request_and_route/tutorial002.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/en/docs/tutorial/security/first-steps.md
* And if the token is stolen, the risk is less. It is not like a permanent key that will work forever (in most of the cases). * The frontend stores that token temporarily somewhere. * The user clicks in the frontend to go to another section of the frontend web app. * The frontend needs to fetch some more data from the API. * But it needs authentication for that specific endpoint.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 8.9K bytes - Viewed (0) -
pyproject.toml
"F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade ] ignore = [ "E501", # line too long, handled by black "B008", # do not perform function calls in argument defaults "C901", # too complex "W191", # indentation contains tabs ] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"]
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.3K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/dependencies-with-yield.md
Sie können `async`hrone oder reguläre Funktionen verwenden. **FastAPI** wird bei jeder das Richtige tun, so wie auch bei normalen Abhängigkeiten. ## Eine Abhängigkeit mit `yield` und `try`. Wenn Sie einen `try`-Block in einer Abhängigkeit mit `yield` verwenden, empfangen Sie alle Exceptions, die bei Verwendung der Abhängigkeit geworfen wurden.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:10:29 GMT 2024 - 13.5K bytes - Viewed (0)