Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for blocks (0.19 sec)

  1. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:30:59 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/en/docs/contributing.md

    All the documentation is in Markdown format in the directory `./docs/en/`.
    
    Many of the tutorials have blocks of code.
    
    In most of the cases, these blocks of code are actual complete applications that can be run as is.
    
    In fact, those blocks of code are not written inside the Markdown, they are Python files in the `./docs_src/` directory.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  3. 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 `uvicorn` with:
    
    <div class="termy">
    
    ```console
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  4. docs/en/data/sponsors.yml

        img: https://fastapi.tiangolo.com/img/sponsors/talkpython-v2.jpg
      - url: https://github.com/deepset-ai/haystack/
        title: Build powerful search from composable, open source building blocks
        img: https://fastapi.tiangolo.com/img/sponsors/haystack-fastapi.svg
      - url: https://databento.com/
        title: Pay as you go for market data
        img: https://fastapi.tiangolo.com/img/sponsors/databento.svg
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Mar 25 23:10:11 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

        **FastAPI** uses them internally to achieve this.
    
    ## Dependencies with `yield` and `HTTPException`
    
    You saw that you can use dependencies with `yield` and have `try` blocks that catch exceptions.
    
    The same way, you could raise an `HTTPException` or similar in the exit code, after the `yield`.
    
    !!! tip
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  6. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:18:23 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. docs/en/docs/css/custom.css

    .termynal-comment {
      color: #4a968f;
      font-style: italic;
      display: block;
    }
    
    .termy {
      /* For right to left languages */
      direction: ltr;
    }
    
    .termy [data-termynal] {
      white-space: pre-wrap;
    }
    
    a.external-link {
      /* For right to left languages */
      direction: ltr;
      display: inline-block;
    }
    
    a.external-link::after {
      /* \00A0 is a non-breaking space
    CSS
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jan 28 09:53:45 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  8. docs/pt/docs/contributing.md

    Toda a documentação está no formato Markdown no diretório `./docs/pt/`.
    
    Muitos dos tutoriais tem blocos de código.
    
    Na maioria dos casos, esse blocos de código são aplicações completas que podem ser rodadas do jeito que estão apresentados.
    
    De fato, esses blocos de código não estão escritos dentro do Markdown, eles são arquivos Python dentro do diretório `./docs_src/`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 21:38:15 GMT 2023
    - 14.9K bytes
    - Viewed (0)
  9. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Apr 28 00:28:00 GMT 2024
    - 385.5K bytes
    - Viewed (1)
  10. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
Back to top