Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 32 for inherits (0.07 seconds)

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

    First, you need to import `BaseModel` from `pydantic`:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[2] *}
    
    ## Create your data model { #create-your-data-model }
    
    Then you declare your data model as a class that inherits from `BaseModel`.
    
    Use standard Python types for all the attributes:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[5:9] *}
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  2. api/maven-api-core/src/main/java/org/apache/maven/api/package-info.java

     * Note that the aggregator project is required to have a {@code pom} packaging.</p>
     *
     * <p><dfn>Project inheritance</dfn> defines a parent-child relationship between projects.
     * The <dfn>child project</dfn> inherits all the information from the <dfn>parent project</dfn>
     * POM.</p>
     *
     */
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Mon Dec 15 11:13:42 GMT 2025
    - 7.7K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/path-params.md

    ### Create an `Enum` class { #create-an-enum-class }
    
    Import `Enum` and create a sub-class that inherits from `str` and from `Enum`.
    
    By inheriting from `str` the API docs will be able to know that the values must be of type `string` and will be able to render correctly.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 9.2K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/first-steps.md

    {* ../../docs_src/first_steps/tutorial001_py39.py hl[1] *}
    
    `FastAPI` is a Python class that provides all the functionality for your API.
    
    /// note | Technical Details
    
    `FastAPI` is a class that inherits directly from `Starlette`.
    
    You can use all the <a href="https://www.starlette.dev/" class="external-link" target="_blank">Starlette</a> functionality with `FastAPI` too.
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 12.8K bytes
    - Click Count (0)
  5. docs/en/docs/tutorial/handling-errors.md

    ```
    
    #### FastAPI's `HTTPException` vs Starlette's `HTTPException` { #fastapis-httpexception-vs-starlettes-httpexception }
    
    **FastAPI** has its own `HTTPException`.
    
    And **FastAPI**'s `HTTPException` error class inherits from Starlette's `HTTPException` error class.
    
    The only difference is that **FastAPI**'s `HTTPException` accepts any JSON-able data for the `detail` field, while Starlette's `HTTPException` only accepts strings for it.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 9K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/sql-databases.md

    Then let's create `Hero`, the actual *table model*, with the **extra fields** that are not always in the other models:
    
    * `id`
    * `secret_name`
    
    Because `Hero` inherits form `HeroBase`, it **also** has the **fields** declared in `HeroBase`, so all the fields for `Hero` are:
    
    * `id`
    * `name`
    * `age`
    * `secret_name`
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 02 05:06:56 GMT 2025
    - 15.8K bytes
    - Click Count (0)
  7. docs/en/docs/tutorial/response-model.md

    ### Type Annotations and Tooling { #type-annotations-and-tooling }
    
    First let's see how editors, mypy and other tools would see this.
    
    `BaseUser` has the base fields. Then `UserIn` inherits from `BaseUser` and adds the `password` field, so, it will include all the fields from both models.
    
    We annotate the function return type as `BaseUser`, but we are actually returning a `UserIn` instance.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 15.5K bytes
    - Click Count (0)
  8. api/maven-api-model/src/main/mdo/maven.mdo

                project's {@code child.project.url.inherit.append.path="false"}</p>
                ]]>
              </description>
              <type>String</type>
            </field>
            <field xml.attribute="true" xml.tagName="child.project.url.inherit.append.path">
              <name>childProjectUrlInheritAppendPath</name>
              <version>4.0.0+</version>
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Nov 26 03:07:35 GMT 2025
    - 133.3K bytes
    - Click Count (0)
  9. android/guava-testlib/test/com/google/common/collect/testing/features/FeatureEnumTest.java

            RetentionPolicy.RUNTIME,
            retentionPolicy.value());
        assertWithMessage(rootLocaleFormat("%s must be inherited.", annotationClass))
            .that(annotationClass.getAnnotation(Inherited.class))
            .isNotNull();
    
        for (String propertyName : new String[] {"value", "absent"}) {
          Method method = null;
          try {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Fri Dec 12 00:25:21 GMT 2025
    - 4.5K bytes
    - Click Count (0)
  10. docs/en/docs/tutorial/extra-models.md

    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.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 6.9K bytes
    - Click Count (0)
Back to Top