Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for modelA (0.18 sec)

  1. docs/de/docs/tutorial/body-nested-models.md

    ## Tief verschachtelte Modelle
    
    Sie können beliebig tief verschachtelte Modelle definieren:
    
    === "Python 3.10+"
    
        ```Python hl_lines="7  12  18  21  25"
        {!> ../../../docs_src/body_nested_models/tutorial007_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="9  14  20  23  27"
        {!> ../../../docs_src/body_nested_models/tutorial007_py39.py!}
        ```
    
    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/tutorial/response-model.md

    `response_model` receives the same type you would declare for a Pydantic model field, so, it can be a Pydantic model, but it can also be, e.g. a `list` of Pydantic models, like `List[Item]`.
    
    FastAPI will use this `response_model` to do all the data documentation, validation, etc. and also to **convert and filter the output data** to its type declaration.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/response-model.md

    `response_model` nimmt denselben Typ entgegen, den Sie auch für ein Pydantic-Modellfeld deklarieren würden, also etwa ein Pydantic-Modell, aber es kann auch z. B. eine `list`e von Pydantic-Modellen sein, wie etwa `List[Item]`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:58 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  4. fastapi/security/http.py

    import binascii
    from base64 import b64decode
    from typing import Optional
    
    from fastapi.exceptions import HTTPException
    from fastapi.openapi.models import HTTPBase as HTTPBaseModel
    from fastapi.openapi.models import HTTPBearer as HTTPBearerModel
    from fastapi.security.base import SecurityBase
    from fastapi.security.utils import get_authorization_scheme_param
    from pydantic import BaseModel
    from starlette.requests import Request
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  5. docs/vi/docs/features.md

    Tất cả validation được xử lí bằng những thiết lập tốt và mạnh mẽ của **Pydantic**.
    
    ### Bảo mật và xác thực
    
    Bảo mật và xác thực đã tích hợp mà không làm tổn hại tới cơ sở dữ liệu hoặc data models.
    
    Tất cả cơ chế bảo mật định nghĩa trong OpenAPI, bao gồm:
    
    * HTTP Basic.
    * **OAuth2** (với **JWT tokens**). Xem hướng dẫn [OAuth2 with JWT](tutorial/security/oauth2-jwt.md){.internal-link target=_blank}.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/generate-clients.md

    You can see those schemas because they were declared with the models in the app.
    
    That information is available in the app's **OpenAPI schema**, and then shown in the API docs (by Swagger UI).
    
    And that same information from the models that is included in OpenAPI is what can be used to **generate the client code**.
    
    ### Generate a TypeScript Client
    
    Now that we have the app with the models, we can generate the client code for the frontend.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/sql-databases.md

    !!! tip
        请注意,您返回的值是 SQLAlchemy 模型或 SQLAlchemy 模型列表。
    
        但是由于所有路径操作的response_model都使用 Pydantic模型/使用orm_mode模式,因此您的 Pydantic 模型中声明的数据将从它们中提取并返回给客户端,并进行所有正常的过滤和验证。
    
    !!! tip
        另请注意,`response_models`应当是标准 Python 类型,例如`List[schemas.Item]`.
    
        但是由于它的内容/参数List是一个 使用orm_mode模式的Pydantic模型,所以数据将被正常检索并返回给客户端,所以没有问题。
    
    ### 关于 `def` 对比 `async def`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  8. tests/test_response_by_alias.py

    def read_dict():
        return {"alias": "Foo"}
    
    
    @app.get("/model", response_model=Model, response_model_by_alias=False)
    def read_model():
        return Model(alias="Foo")
    
    
    @app.get("/list", response_model=List[Model], response_model_by_alias=False)
    def read_list():
        return [{"alias": "Foo"}, {"alias": "Bar"}]
    
    
    @app.get("/by-alias/dict", response_model=Model)
    def by_alias_dict():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  9. fastapi/security/oauth2.py

    from typing import Any, Dict, List, Optional, Union, cast
    
    from fastapi.exceptions import HTTPException
    from fastapi.openapi.models import OAuth2 as OAuth2Model
    from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel
    from fastapi.param_functions import Form
    from fastapi.security.base import SecurityBase
    from fastapi.security.utils import get_authorization_scheme_param
    from starlette.requests import Request
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  10. tests/test_tutorial/test_body/test_tutorial001_py310.py

        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "model_attributes_type",
                        "loc": ["body"],
                        "msg": "Input should be a valid dictionary or object to extract fields from",
                        "input": "name=Foo&price=50.5",
                    }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (2)
Back to top