Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for attribute (0.2 sec)

  1. 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)
  2. docs/en/docs/how-to/custom-request-and-route.md

    ```Python hl_lines="18-26"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        A `Request` has a `request.scope` attribute, that's just a Python `dict` containing the metadata related to the request.
    
        A `Request` also has a `request.receive`, that's a function to "receive" the body of the request.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.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/en/docs/tutorial/sql-databases.md

    ```Python hl_lines="4  7-8  18-19"
    {!../../../docs_src/sql_databases/sql_app/models.py!}
    ```
    
    The `__tablename__` attribute tells SQLAlchemy the name of the table to use in the database for each of these models.
    
    ### Create model attributes/columns
    
    Now create all the model (class) attributes.
    
    Each of these attributes represents a column in its corresponding database table.
    
    We use `Column` from SQLAlchemy as the default value.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/body-updates.md

    !!! note "Hinweis"
        Beachten Sie, dass das hereinkommende Modell immer noch validiert wird.
    
        Wenn Sie also Teil-Aktualisierungen empfangen wollen, die alle Attribute auslassen können, müssen Sie ein Modell haben, dessen Attribute alle als optional gekennzeichnet sind (mit Defaultwerten oder `None`).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:37 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/path-params.md

    Indem Sie von `str` erben, weiß die API Dokumentation, dass die Werte des Enums vom Typ `str` sein müssen, und wird in der Lage sein, korrekt zu rendern.
    
    Erstellen Sie dann Klassen-Attribute mit festgelegten Werten, welches die erlaubten Werte sein werden:
    
    ```Python hl_lines="1  6-9"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  7. 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)
  8. docs/en/docs/advanced/settings.md

    !!! info
        In Pydantic version 1 the configuration was done in an internal class `Config`, in Pydantic version 2 it's done in an attribute `model_config`. This attribute takes a `dict`, and to get autocompletion and inline errors you can import and use `SettingsConfigDict` to define that `dict`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top