Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 42 for BaseModel (0.07 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. scripts/people.py

        edges: list[DiscussionsEdge]
    
    
    class DiscussionsRepository(BaseModel):
        discussions: Discussions
    
    
    class DiscussionsResponseData(BaseModel):
        repository: DiscussionsRepository
    
    
    class DiscussionsResponse(BaseModel):
        data: DiscussionsResponseData
    
    
    class Settings(BaseSettings):
        github_token: SecretStr
        github_repository: str
        httpx_timeout: int = 30
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 13:51:24 GMT 2026
    - 15K bytes
    - Click Count (0)
  2. fastapi/_compat/v2.py

    def create_body_model(
        *, fields: Sequence[ModelField], model_name: str
    ) -> type[BaseModel]:
        field_params = {f.name: (f.field_info.annotation, f.field_info) for f in fields}
        BodyModel: type[BaseModel] = create_model(model_name, **field_params)  # type: ignore[call-overload]
        return BodyModel
    
    
    def get_model_fields(model: type[BaseModel]) -> list[ModelField]:
        model_fields: list[ModelField] = []
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  3. docs/zh/docs/tutorial/body.md

    由于不推荐,在使用 `GET` 时,Swagger UI 的交互式文档不会显示请求体的文档,而且中间的代理可能也不支持它。
    
    ///
    
    ## 导入 Pydantic 的 `BaseModel` { #import-pydantics-basemodel }
    
    从 `pydantic` 中导入 `BaseModel`:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[2] *}
    
    ## 创建数据模型 { #create-your-data-model }
    
    把数据模型声明为继承 `BaseModel` 的类。
    
    使用 Python 标准类型声明所有属性:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[5:9] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 5.9K bytes
    - Click Count (0)
  4. fastapi/dependencies/utils.py

            return True
        # If it's a Form (or File) field, it has to be a BaseModel (or a union of BaseModels) to be top level
        # otherwise it has to be embedded, so that the key value pair can be extracted
        if (
            isinstance(first_field.field_info, params.Form)
            and not lenient_issubclass(first_field.field_info.annotation, BaseModel)
            and not is_union_of_base_models(first_field.field_info.annotation)
        ):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 38.7K bytes
    - Click Count (3)
  5. fastapi/security/http.py

    from fastapi.security.base import SecurityBase
    from fastapi.security.utils import get_authorization_scheme_param
    from pydantic import BaseModel
    from starlette.requests import Request
    from starlette.status import HTTP_401_UNAUTHORIZED
    
    
    class HTTPBasicCredentials(BaseModel):
        """
        The HTTP Basic credentials given as the result of using `HTTPBasic` in a
        dependency.
    
        Read more about it in the
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 16 10:16:48 GMT 2026
    - 13.1K bytes
    - Click Count (0)
  6. fastapi/openapi/models.py

    
    class Server(BaseModelWithConfig):
        url: AnyUrl | str
        description: str | None = None
        variables: dict[str, ServerVariable] | None = None
    
    
    class Reference(BaseModel):
        ref: str = Field(alias="$ref")
    
    
    class Discriminator(BaseModel):
        propertyName: str
        mapping: dict[str, str] | None = None
    
    
    class XML(BaseModelWithConfig):
        name: str | None = None
        namespace: str | None = None
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 14.2K bytes
    - Click Count (0)
  7. docs/ko/docs/features.md

    여러분은 타입이 있는 표준 Python을 다음과 같이 작성합니다:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # 변수를 str로 선언합니다
    # 그리고 함수 내부에서 편집기 지원을 받습니다
    def main(user_id: str):
        return user_id
    
    
    # Pydantic 모델
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    그 다음 다음과 같이 사용할 수 있습니다:
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 11K bytes
    - Click Count (0)
  8. fastapi/encoders.py

    from typing import Annotated, Any
    from uuid import UUID
    
    from annotated_doc import Doc
    from fastapi.exceptions import PydanticV1NotSupportedError
    from fastapi.types import IncEx
    from pydantic import BaseModel
    from pydantic.color import Color  # ty: ignore[deprecated]
    from pydantic.networks import AnyUrl, NameEmail
    from pydantic.types import SecretBytes, SecretStr
    from pydantic_core import PydanticUndefinedType
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  9. docs/ja/docs/features.md

    型を使った標準的な Python を記述します:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declare a variable as a str
    # and get editor support inside the function
    def main(user_id: str):
        return user_id
    
    
    # A Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    これは次のように使えます:
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  10. docs/zh/docs/features.md

    编写带有类型标注的标准 Python:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # 将变量声明为 str
    # 并在函数内获得编辑器支持
    def main(user_id: str):
        return user_id
    
    
    # 一个 Pydantic 模型
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    可以像这样来使用:
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.7K bytes
    - Click Count (0)
Back to Top