Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 98 for Models (0.25 sec)

  1. docs/en/docs/tutorial/extra-models.md

    # Extra Models
    
    Continuing with the previous example, it will be common to have more than one related model.
    
    This is especially the case for user models, because:
    
    * The **input model** needs to be able to have a password.
    * The **output model** should not have a password.
    * The **database model** would probably need to have a hashed password.
    
    !!! danger
        Never store user's plaintext passwords. Always store a "secure hash" that you can then verify.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  2. fastapi/openapi/models.py

        security: Optional[List[Dict[str, List[str]]]] = None
        tags: Optional[List[Tag]] = None
        externalDocs: Optional[ExternalDocumentation] = None
    
    
    _model_rebuild(Schema)
    _model_rebuild(Operation)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/extra-models.md

        ```Python hl_lines="1  14-15  18-20  33"
        {!> ../../../docs_src/extra_models/tutorial003.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="1  14-15  18-20  33"
        {!> ../../../docs_src/extra_models/tutorial003_py310.py!}
        ```
    
    ### `Union` 🐍 3️⃣.1️⃣0️⃣
    
    👉 🖼 👥 🚶‍♀️ `Union[PlaneItem, CarItem]` 💲 ❌ `response_model`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/body-nested-models.md

    ## Modelos aninhados
    
    Cada atributo de um modelo Pydantic tem um tipo.
    
    Mas esse tipo pode ser outro modelo Pydantic.
    
    Portanto, você pode declarar "objects" JSON profundamente aninhados com nomes, tipos e validações de atributos específicos.
    
    Tudo isso, aninhado arbitrariamente.
    
    ### Defina um sub-modelo
    
    Por exemplo, nós podemos definir um modelo `Image`:
    
    ```Python hl_lines="9-11"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  5. api/maven-api-plugin/pom.xml

                  <velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
                  <version>2.0.0</version>
                  <models>
                    <model>src/main/mdo/plugin.mdo</model>
                  </models>
                  <templates>
                    <template>model.vm</template>
                  </templates>
                  <params>
                    <param>packageModelV4=org.apache.maven.api.plugin.descriptor</param>
    XML
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 08:48:58 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/sql-databases.md

    ## Create the Pydantic models
    
    Now let's check the file `sql_app/schemas.py`.
    
    !!! tip
        To avoid confusion between the SQLAlchemy *models* and the Pydantic *models*, we will have the file `models.py` with the SQLAlchemy models, and the file `schemas.py` with the Pydantic models.
    
        These Pydantic models define more or less a "schema" (a valid data shape).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/dataclasses.md

    * data validation
    * data serialization
    * data documentation, etc.
    
    This works the same way as with Pydantic models. And it is actually achieved in the same way underneath, using Pydantic.
    
    !!! info
        Keep in mind that dataclasses can't do everything Pydantic models can do.
    
        So, you might still need to use Pydantic models.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  8. fastapi/encoders.py

            Doc(
                """
                Pydantic's `include` parameter, passed to Pydantic models to set the
                fields to include.
                """
            ),
        ] = None,
        exclude: Annotated[
            Optional[IncEx],
            Doc(
                """
                Pydantic's `exclude` parameter, passed to Pydantic models to set the
                fields to exclude.
                """
            ),
        ] = None,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  9. fastapi/_compat.py

        def _model_rebuild(model: Type[BaseModel]) -> None:
            model.model_rebuild()
    
        def _model_dump(
            model: BaseModel, mode: Literal["json", "python"] = "json", **kwargs: Any
        ) -> Any:
            return model.model_dump(mode=mode, **kwargs)
    
        def _get_model_config(model: BaseModel) -> Any:
            return model.model_config
    
        def get_schema_from_model_field(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  10. api/maven-api-metadata/pom.xml

                  <velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
                  <version>1.2.0</version>
                  <models>
                    <model>src/main/mdo/metadata.mdo</model>
                  </models>
                  <templates>
                    <template>model.vm</template>
                  </templates>
                  <params>
                    <param>packageModelV4=org.apache.maven.api.metadata</param>
    XML
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 08:48:58 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top