Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 554 for Model1 (0.11 sec)

  1. docs/en/docs/advanced/settings.md

    ### Create the `Settings` object
    
    Import `BaseSettings` from Pydantic and create a sub-class, very much like with a Pydantic model.
    
    The same way as with Pydantic models, you declare class attributes with type annotations, and possibly default values.
    
    You can use all the same validation features and tools you use for Pydantic models, like different data types and additional validations with `Field()`.
    
    //// tab | Pydantic v2
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  2. docs_src/events/tutorial003.py

        return x * 42
    
    
    ml_models = {}
    
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        # Load the ML model
        ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/predict")
    async def predict(x: float):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 07 15:46:00 UTC 2023
    - 569 bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/security/simple-oauth2.md

        hashed_password = user_dict["hashed_password"],
    )
    ```
    
    /// info | Informação
    
    Para uma explicação mais completa de `**user_dict`, verifique [a documentação para **Extra Models**](../extra-models.md#about-user_indict){.internal-link target=_blank}.
    
    ///
    
    ## Retorne o token
    
    A resposta do endpoint `token` deve ser um objeto JSON.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 12:17:45 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/security/get-current-user.md

    We are not restricted to having only one dependency that can return that type of data.
    
    ///
    
    ## Other models
    
    You can now get the current user directly in the *path operation functions* and deal with the security mechanisms at the **Dependency Injection** level, using `Depends`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  5. compat/maven-compat/pom.xml

            <artifactId>modello-maven-plugin</artifactId>
            <configuration>
              <version>1.0.0</version>
              <models>
                <model>src/main/mdo/profiles.mdo</model>
                <model>src/main/mdo/paramdoc.mdo</model>
              </models>
            </configuration>
            <executions>
              <execution>
                <id>modello</id>
                <goals>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. fastapi/utils.py

                "field (e.g. Union[Response, dict, None]) you can disable generating the "
                "response model from the type annotation with the path operation decorator "
                "parameter response_model=None. Read more: "
                "https://fastapi.tiangolo.com/tutorial/response-model/"
            ) from None
    
    
    def create_cloned_field(
        field: ModelField,
        *,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 31 23:46:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. scripts/playwright/header_param_models/image01.py

        page.get_by_role("button", name="GET /items/ Read Items").click()
        page.get_by_role("button", name="Try it out").click()
        # Manually add the screenshot
        page.screenshot(path="docs/en/docs/img/tutorial/header-param-models/image01.png")
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/header_param_models/tutorial001.py"]
    )
    try:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  8. scripts/playwright/request_form_models/image01.py

        page.get_by_role("button", name="POST /login/ Login").click()
        page.get_by_role("button", name="Try it out").click()
        # Manually add the screenshot
        page.screenshot(path="docs/en/docs/img/tutorial/request-form-models/image01.png")
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/request_form_models/tutorial001.py"]
    )
    try:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 13 09:14:46 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/testing.md

    /// info
    
    Beachten Sie, dass der `TestClient` Daten empfängt, die nach JSON konvertiert werden können, keine Pydantic-Modelle.
    
    Wenn Sie ein Pydantic-Modell in Ihrem Test haben und dessen Daten während des Testens an die Anwendung senden möchten, können Sie den `jsonable_encoder` verwenden, der in [JSON-kompatibler Encoder](encoder.md){.internal-link target=_blank} beschrieben wird.
    
    ///
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/schema-extra-example.md

    ///
    
    ### Pydantic and FastAPI `examples`
    
    When you add `examples` inside a Pydantic model, using `schema_extra` or `Field(examples=["something"])` that example is added to the **JSON Schema** for that Pydantic model.
    
    And that **JSON Schema** of the Pydantic model is included in the **OpenAPI** of your API, and then it's used in the docs UI.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
Back to top