Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for notice (0.2 sec)

  1. docs/en/docs/tutorial/body-fields.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="4"
        {!> ../../../docs_src/body_fields/tutorial001.py!}
        ```
    
    !!! warning
        Notice that `Field` is imported directly from `pydantic`, not from `fastapi` as are all the rest (`Query`, `Path`, `Body`, etc).
    
    ## Declare model attributes
    
    You can then use `Field` with model attributes:
    
    === "Python 3.10+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/path-params.md

    ```JSON
    {"item_id":3}
    ```
    
    !!! check
        Notice that the value your function received (and returned) is `3`, as a Python `int`, not a string `"3"`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/dataclasses.md

    7. Here the `response_model` is using a type annotation of a list of `Author` dataclasses.
    
        Again, you can combine `dataclasses` with standard type annotations.
    
    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.
    
    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)
  4. docs/en/docs/tutorial/testing.md

    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip
        Notice that the testing functions are normal `def`, not `async def`.
    
        And the calls to the client are also normal calls, not using `await`.
    
        This allows you to use `pytest` directly without complications.
    
    !!! note "Technical Details"
        You could also use `from starlette.testclient import TestClient`.
    
    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)
  5. docs/en/docs/how-to/async-sql-encode-databases.md

    !!! note
        Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`.
    
    ### About `{**note.dict(), "id": last_record_id}`
    
    `note` is a Pydantic `Note` object.
    
    `note.dict()` returns a `dict` with its data, something like:
    
    ```Python
    {
        "text": "Some note",
        "completed": False,
    }
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/get-current-user.md

    === "Python 3.8+ non-Annotated"
    
        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="31"
        {!> ../../../docs_src/security/tutorial002.py!}
        ```
    
    Notice that we declare the type of `current_user` as the Pydantic model `User`.
    
    This will help us inside of the function with all the completion and type checks.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body-multiple-params.md

        !!! tip
            Prefer to use the `Annotated` version if possible.
    
        ```Python hl_lines="19-21"
        {!> ../../../docs_src/body_multiple_params/tutorial001.py!}
        ```
    
    !!! note
        Notice that, in this case, the `item` that would be taken from the body is optional. As it has a `None` default value.
    
    ## Multiple body parameters
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/nosql-databases-couchbase.md

    ```Python hl_lines="31-33"
    {!../../../docs_src/nosql_databases/tutorial001.py!}
    ```
    
    !!! note
        Notice that we have a `hashed_password` and a `type` field that will be stored in the database.
    
        But it is not part of the general `User` model (the one we will return in the *path operation*).
    
    ## Get the user
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/metadata.md

    Create metadata for your tags and pass it to the `openapi_tags` parameter:
    
    ```Python hl_lines="3-16  18"
    {!../../../docs_src/metadata/tutorial004.py!}
    ```
    
    Notice that you can use Markdown inside of the descriptions, for example "login" will be shown in bold (**login**) and "fancy" will be shown in italics (_fancy_).
    
    !!! tip
        You don't have to add metadata for all the tags that you use.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  10. docs/en/layouts/custom.yml

    # sell copies of the Software, and to permit persons to whom the Software is
    # furnished to do so, subject to the following conditions:
    
    # The above copyright notice and this permission notice shall be included in
    # all copies or substantial portions of the Software.
    
    # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jun 26 14:05:43 GMT 2023
    - 6.5K bytes
    - Viewed (0)
Back to top