Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for function (0.34 sec)

  1. docs/en/docs/tutorial/dependencies/index.md

    !!! tip
        You'll see what other "things", apart from functions, can be used as dependencies in the next chapter.
    
    Whenever a new request arrives, **FastAPI** will take care of:
    
    * Calling your dependency ("dependable") function with the correct parameters.
    * Get the result from your function.
    * Assign that result to the parameter in your *path operation function*.
    
    ```mermaid
    graph TB
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. docs/de/docs/advanced/settings.md

        rect rgba(0, 255, 0, .1)
            code ->> function: say_hi(name="Camila")
            function ->> execute: führe Code der Funktion aus
            execute ->> code: gib das Resultat zurück
        end
    
        rect rgba(0, 255, 255, .1)
            code ->> function: say_hi(name="Camila")
            function ->> code: gib das gespeicherte Resultat zurück
        end
    
        rect rgba(0, 255, 0, .1)
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:14 GMT 2024
    - 17.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/custom-response.md

    {!../../../docs_src/custom_response/tutorial008.py!}
    ```
    
    1. This is the generator function. It's a "generator function" because it contains `yield` statements inside.
    2. By using a `with` block, we make sure that the file-like object is closed after the generator function is done. So, after it finishes sending the response.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  4. docs/en/docs/async.md

    ### Other utility functions
    
    Any other utility function that you call directly can be created with normal `def` or `async def` and FastAPI won't affect the way you call it.
    
    This is in contrast to the functions that FastAPI calls for you: *path operation functions* and dependencies.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params-str-validations.md

    ```
    
    ### Advantages of `Annotated`
    
    **Using `Annotated` is recommended** instead of the default value in function parameters, it is **better** for multiple reasons. 🤓
    
    The **default** value of the **function parameter** is the **actual default** value, that's more intuitive with Python in general. 😌
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  6. fastapi/openapi/docs.py

                    qp = location.search.substring(1);
                }
    
                arr = qp.split("&");
                arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
                qp = qp ? JSON.parse('{' + arr.join() + '}',
                        function (key, value) {
                            return key === "" ? value : decodeURIComponent(value);
                        }
                ) : {};
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/request-files.md

    As all these methods are `async` methods, you need to "await" them.
    
    For example, inside of an `async` *path operation function* you can get the contents with:
    
    ```Python
    contents = await myfile.read()
    ```
    
    If you are inside of a normal `def` *path operation function*, you can access the `UploadFile.file` directly, for example:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-model.md

    # Response Model - Return Type
    
    You can declare the type used for the response by annotating the *path operation function* **return type**.
    
    You can use **type annotations** the same way you would for input data in function **parameters**, you can use Pydantic models, lists, dictionaries, scalar values like integers, booleans, etc.
    
    === "Python 3.10+"
    
        ```Python hl_lines="16  21"
        {!> ../../../docs_src/response_model/tutorial001_01_py310.py!}
        ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/settings.md

    participant code as Code
    participant function as say_hi()
    participant execute as Execute function
    
        rect rgba(0, 255, 0, .1)
            code ->> function: say_hi(name="Camila")
            function ->> execute: execute function code
            execute ->> code: return the result
        end
    
        rect rgba(0, 255, 255, .1)
            code ->> function: say_hi(name="Camila")
            function ->> code: return stored result
        end
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/first-steps.md

    ### Step 4: define the **path operation function**
    
    This is our "**path operation function**":
    
    * **path**: is `/`.
    * **operation**: is `get`.
    * **function**: is the function below the "decorator" (below `@app.get("/")`).
    
    ```Python hl_lines="7"
    {!../../../docs_src/first_steps/tutorial001.py!}
    ```
    
    This is a Python function.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
Back to top