Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for Reconfig (0.18 sec)

  1. docs/de/docs/advanced/settings.md

    Und dann aktualisieren Sie Ihre `config.py` mit:
    
    === "Pydantic v2"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/settings/app03_an/config.py!}
        ```
    
        !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:14 GMT 2024
    - 17.8K bytes
    - Viewed (0)
  2. docs/ko/docs/tutorial/schema-extra-example.md

        ```
    
    추가 정보는 있는 그대로 해당 모델의 **JSON 스키마** 결과에 추가되고, API 문서에서 사용합니다.
    
    === "Pydantic v2"
    
        Pydantic 버전 2에서 <a href="https://docs.pydantic.dev/latest/usage/model_config/" class="external-link" target="_blank">Pydantic 공식 문서: Model Config</a>에 나와 있는 것처럼 `dict`를 받는 `model_config` 어트리뷰트를 사용할 것입니다.
    
        `"json_schema_extra"`를 생성된 JSON 스키마에서 보여주고 싶은 별도의 데이터와 `examples`를 포함하는 `dict`으로 설정할 수 있습니다.
    
    === "Pydantic v1"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Feb 09 12:35:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. fastapi/openapi/models.py

            ) -> CoreSchema:
                return with_info_plain_validator_function(cls._validate)
    
    
    class BaseModelWithConfig(BaseModel):
        if PYDANTIC_V2:
            model_config = {"extra": "allow"}
    
        else:
    
            class Config:
                extra = "allow"
    
    
    class Contact(BaseModelWithConfig):
        name: Optional[str] = None
        url: Optional[AnyUrl] = None
        email: Optional[EmailStr] = None
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  4. scripts/docs.py

        config["extra"]["alternate"] = new_alternate
        return config
    
    
    def update_config() -> None:
        config = get_updated_config_content()
        en_config_path.write_text(
            yaml.dump(config, sort_keys=False, width=200, allow_unicode=True),
            encoding="utf-8",
        )
    
    
    @app.command()
    def verify_config() -> None:
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  5. docs/en/docs/advanced/settings.md

        {!> ../../../docs_src/settings/app03_an/config_pv1.py!}
        ```
    
        !!! tip
            The `Config` class is used just for Pydantic configuration. You can read more at <a href="https://docs.pydantic.dev/1.10/usage/model_config/" class="external-link" target="_blank">Pydantic Model Config</a>.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/settings.md

    ### 从 `.env` 文件中读取设置
    
    然后,您可以使用以下方式更新您的 `config.py`:
    
    ```Python hl_lines="9-10"
    {!../../../docs_src/settings/app03/config.py!}
    ```
    
    在这里,我们在 Pydantic 的 `Settings` 类中创建了一个名为 `Config` 的类,并将 `env_file` 设置为我们想要使用的 dotenv 文件的文件名。
    
    !!! tip
        `Config` 类仅用于 Pydantic 配置。您可以在<a href="https://docs.pydantic.dev/latest/api/config/" class="external-link" target="_blank">Pydantic Model Config</a>中阅读更多相关信息。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 13.9K bytes
    - Viewed (0)
  7. tests/test_openapi_separate_input_output_schemas.py

        sub_description: Optional[str] = None
        tags: List[str] = []
        if PYDANTIC_V2:
            model_config = {"json_schema_serialization_defaults_required": True}
    
    
    class Item(BaseModel):
        name: str
        description: Optional[str] = None
        sub: Optional[SubItem] = None
        if PYDANTIC_V2:
            model_config = {"json_schema_serialization_defaults_required": True}
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  8. docs/en/docs/tutorial/sql-databases.md

    ### Use Pydantic's `orm_mode`
    
    Now, in the Pydantic *models* for reading, `Item` and `User`, add an internal `Config` class.
    
    This <a href="https://docs.pydantic.dev/latest/api/config/" class="external-link" target="_blank">`Config`</a> class is used to provide configurations to Pydantic.
    
    In the `Config` class, set the attribute `orm_mode = True`.
    
    === "Python 3.10+"
    
        ```Python hl_lines="13  17-18  29  34-35"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
Back to top