Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for attribute (0.22 sec)

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

        ```
    
    !!! 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+"
    
        ```Python hl_lines="11-14"
        {!> ../../../docs_src/body_fields/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="11-14"
    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/de/docs/tutorial/body-nested-models.md

        {!> ../../../docs_src/body_nested_models/tutorial005.py!}
        ```
    
    Es wird getestet, ob der String eine gültige URL ist, und als solche wird er in JSON Schema / OpenAPI dokumentiert.
    
    ## Attribute mit Listen von Kindmodellen
    
    Sie können Pydantic-Modelle auch als Typen innerhalb von `list`, `set`, usw. verwenden:
    
    === "Python 3.10+"
    
        ```Python hl_lines="18"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/body-nested-models.md

    And it will be annotated / documented accordingly too.
    
    ## Nested Models
    
    Each attribute of a Pydantic model has a type.
    
    But that type can itself be another Pydantic model.
    
    So, you can declare deeply nested JSON "objects" with specific attribute names, types and validations.
    
    All that, arbitrarily nested.
    
    ### Define a submodel
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/first-steps.md

    #### Daten-„Schema“
    
    Der Begriff „Schema“ kann sich auch auf die Form von Daten beziehen, wie z. B. einen JSON-Inhalt.
    
    In diesem Fall sind die JSON-Attribute und deren Datentypen, usw. gemeint.
    
    #### OpenAPI und JSON Schema
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 12:16:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/sql-databases-peewee.md

    {!../../../docs_src/sql_databases_peewee/sql_app/models.py!}
    ```
    
    !!! tip
        Peewee creates several magic attributes.
    
        It will automatically add an `id` attribute as an integer to be the primary key.
    
        It will chose the name of the tables based on the class names.
    
        For the `Item`, it will create an attribute `owner_id` with the integer ID of the `User`. But we don't declare it anywhere.
    
    ## Create the Pydantic models
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/extra-models.md

    And these models are all sharing a lot of the data and duplicating attribute names and types.
    
    We could do better.
    
    We can declare a `UserBase` model that serves as a base for our other models. And then we can make subclasses of that model that inherit its attributes (type declarations, validation, etc).
    
    All the data conversion, validation, documentation, etc. will still work as normally.
    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 (1)
  7. docs/en/docs/advanced/openapi-webhooks.md

    !!! info
        Webhooks are available in OpenAPI 3.1.0 and above, supported by FastAPI `0.99.0` and above.
    
    ## An app with webhooks
    
    When you create a **FastAPI** application, there is a `webhooks` attribute that you can use to define *webhooks*, the same way you would define *path operations*, for example with `@app.webhooks.post()`.
    
    ```Python hl_lines="9-13  36-53"
    {!../../../docs_src/openapi_webhooks/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/openapi-callbacks.md

    ```Python hl_lines="35"
    {!../../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    !!! tip
        Notice that you are not passing the router itself (`invoices_callback_router`) to `callback=`, but the attribute `.routes`, as in `invoices_callback_router.routes`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/body.md

    * Ihnen die erhaltenen Daten im Parameter `item` übergeben.
        * Da Sie diesen in der Funktion als vom Typ `Item` deklariert haben, erhalten Sie die ganze Editor-Unterstützung (Autovervollständigung, usw.) für alle Attribute und deren Typen.
    * Eine <a href="https://json-schema.org" class="external-link" target="_blank">JSON Schema</a> Definition für Ihr Modell generieren, welche Sie überall sonst verwenden können, wenn es für Ihr Projekt Sinn macht.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/advanced-dependencies.md

        ```Python hl_lines="16"
        {!> ../../../docs_src/dependencies/tutorial011.py!}
        ```
    
    And that way we are able to "parameterize" our dependency, that now has `"bar"` inside of it, as the attribute `checker.fixed_content`.
    
    ## Use the instance as a dependency
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
Back to top