Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 226 for fiction (0.21 sec)

  1. docs/en/docs/tutorial/middleware.md

    ## Create a middleware
    
    To create a middleware you use the decorator `@app.middleware("http")` on top of a function.
    
    The middleware function receives:
    
    * The `request`.
    * A function `call_next` that will receive the `request` as a parameter.
        * This function will pass the `request` to the corresponding *path operation*.
        * Then it returns the `response` generated by the corresponding *path operation*.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  2. docs_src/websockets/tutorial002_an_py310.py

            </ul>
            <script>
            var ws = null;
                function connect(event) {
                    var itemId = document.getElementById("itemId")
                    var token = document.getElementById("token")
                    ws = new WebSocket("ws://localhost:8000/items/" + itemId.value + "/ws?token=" + token.value);
                    ws.onmessage = function(event) {
                        var messages = document.getElementById('messages')
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/generate-clients.md

    ### Custom Generate Unique ID Function
    
    FastAPI uses a **unique ID** for each *path operation*, it is used for the **operation ID** and also for the names of any needed custom models, for requests or responses.
    
    You can customize that function. It takes an `APIRoute` and outputs a string.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. docs_src/websockets/tutorial003.py

                ws.onmessage = function(event) {
                    var messages = document.getElementById('messages')
                    var message = document.createElement('li')
                    var content = document.createTextNode(event.data)
                    message.appendChild(content)
                    messages.appendChild(message)
                };
                function sendMessage(event) {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 13:52:19 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/dataclasses.md

    8. Notice that this *path operation function* uses regular `def` instead of `async def`.
    
        As always, in FastAPI you can combine `def` and `async def` as needed.
    
        If you need a refresher about when to use which, check out the section _"In a hurry?"_ in the docs about [`async` and `await`](../async.md#in-a-hurry){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/path-params.md

    Vous pouvez déclarer le type d'un paramètre de chemin dans la fonction, en utilisant les annotations de type Python :
    
    
    ```Python hl_lines="7"
    {!../../../docs_src/path_params/tutorial002.py!}
    ```
    
    Ici, `item_id` est déclaré comme `int`.
    
    !!! check "vérifier"
        Ceci vous permettra d'obtenir des fonctionnalités de l'éditeur dans votre fonction, telles
        que des vérifications d'erreur, de l'auto-complétion, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
  7. 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)
  8. docs/en/docs/alternatives.md

        Check more details in the [Deployment](deployment/index.md){.internal-link target=_blank} section.
    
    ## Benchmarks and speed
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  9. docs/en/docs/external-links.md

    {% for section_name, section_content in external_links.items() %}
    
    ## {{ section_name }}
    
    {% for lang_name, lang_content in section_content.items() %}
    
    ### {{ lang_name }}
    
    {% for item in lang_content %}
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Oct 22 07:35:13 GMT 2023
    - 1K bytes
    - Viewed (0)
  10. 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)
Back to top