Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 143 for function (0.16 sec)

  1. fastapi/datastructures.py

    from typing_extensions import Annotated, Doc
    
    
    class UploadFile(StarletteUploadFile):
        """
        A file uploaded in a request.
    
        Define it as a *path operation function* (or dependency) parameter.
    
        If you are using a regular `def` function, you can use the `upload_file.file`
        attribute to access the raw standard Python file (blocking, not async), useful and
        needed for non-async code.
    
        Read more about it in the
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. docs/en/docs/reference/dependencies.md

    # Dependencies - `Depends()` and `Security()`
    
    ## `Depends()`
    
    Dependencies are handled mainly with the special function `Depends()` that takes a callable.
    
    Here is the reference for it and its parameters.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Depends
    ```
    
    ::: fastapi.Depends
    
    ## `Security()`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 671 bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/testing.md

    !!! tip
        If you want to call `async` functions in your tests apart from sending requests to your FastAPI application (e.g. asynchronous database functions), have a look at the [Async Tests](../advanced/async-tests.md){.internal-link target=_blank} in the advanced tutorial.
    
    ## Separating tests
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Context Managers
    
    ### What are "Context Managers"
    
    "Context Managers" are any of those Python objects that you can use in a `with` statement.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/oauth2-scopes.md

    In this case, we pass a dependency function `get_current_active_user` to `Security` (the same way we would do with `Depends`).
    
    But we also pass a `list` of scopes, in this case with just one scope: `items` (it could have more).
    
    And the dependency function `get_current_active_user` can also declare sub-dependencies, not only with `Depends` but also with `Security`. Declaring its own sub-dependency function (`get_current_user`), and more scope requirements.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  6. docs/de/docs/reference/dependencies.md

    # Abhängigkeiten – `Depends()` und `Security()`
    
    ## `Depends()`
    
    Abhängigkeiten werden hauptsächlich mit der speziellen Funktion `Depends()` behandelt, die ein Callable entgegennimmt.
    
    Hier finden Sie deren Referenz und Parameter.
    
    Sie können sie direkt von `fastapi` importieren:
    
    ```python
    from fastapi import Depends
    ```
    
    ::: fastapi.Depends
    
    ## `Security()`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:16:45 GMT 2024
    - 765 bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/dependencies/sub-dependencies.md

        ```Python hl_lines="13"
        {!> ../../../docs_src/dependencies/tutorial005.py!}
        ```
    
    Betrachten wir die deklarierten Parameter:
    
    * Obwohl diese Funktion selbst eine Abhängigkeit ist („Dependable“, etwas hängt von ihr ab), deklariert sie auch eine andere Abhängigkeit („Dependant“, sie hängt von etwas anderem ab).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:09:48 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/body.md

        ```
    
    ## Request body + path parameters
    
    You can declare path parameters and request body at the same time.
    
    **FastAPI** will recognize that the function parameters that match path parameters should be **taken from the path**, and that function parameters that are declared to be Pydantic models should be **taken from the request body**.
    
    === "Python 3.10+"
    
        ```Python hl_lines="15-16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/path-operation-advanced-configuration.md

    ```Python hl_lines="6"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!}
    ```
    
    ### Using the *path operation function* name as the operationId
    
    If you want to use your APIs' function names as `operationId`s, you can iterate over all of them and override each *path operation's* `operation_id` using their `APIRoute.name`.
    
    You should do it after adding all your *path operations*.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/openapi-callbacks.md

    Es gibt zwei Hauptunterschiede zu einer normalen *Pfadoperation*:
    
    * Es muss kein tatsächlicher Code vorhanden sein, da Ihre Anwendung diesen Code niemals aufruft. Sie wird nur zur Dokumentation der *externen API* verwendet. Die Funktion könnte also einfach `pass` enthalten.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:23 GMT 2024
    - 8.8K bytes
    - Viewed (0)
Back to top