Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for Reconfig (0.17 sec)

  1. docs_src/settings/app02_an_py39/config.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 159 bytes
    - Viewed (0)
  2. docs_src/settings/app02/config.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 159 bytes
    - Viewed (0)
  3. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  4. tests/test_jsonable_encoder.py

    class RoleEnum(Enum):
        admin = "admin"
        normal = "normal"
    
    
    class ModelWithConfig(BaseModel):
        role: Optional[RoleEnum] = None
    
        if PYDANTIC_V2:
            model_config = {"use_enum_values": True}
        else:
    
            class Config:
                use_enum_values = True
    
    
    class ModelWithAlias(BaseModel):
        foo: str = Field(alias="Foo")
    
    
    class ModelWithDefault(BaseModel):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  6. docs_src/settings/app03_an/main.py

    from functools import lru_cache
    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    
    from . import config
    
    app = FastAPI()
    
    
    @lru_cache
    def get_settings():
        return config.Settings()
    
    
    @app.get("/info")
    async def info(settings: Annotated[config.Settings, Depends(get_settings)]):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 451 bytes
    - Viewed (0)
  7. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 13.9K bytes
    - Viewed (0)
  8. docs_src/sql_databases/sql_app/schemas.py

        pass
    
    
    class Item(ItemBase):
        id: int
        owner_id: int
    
        class Config:
            orm_mode = True
    
    
    class UserBase(BaseModel):
        email: str
    
    
    class UserCreate(UserBase):
        password: str
    
    
    class User(UserBase):
        id: int
        is_active: bool
        items: List[Item] = []
    
        class Config:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 502 bytes
    - Viewed (0)
  9. docs/de/docs/advanced/middleware.md

    ```Python
    from unicorn import UnicornMiddleware
    
    app = SomeASGIApp()
    
    new_app = UnicornMiddleware(app, some_config="rainbow")
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:18:15 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  10. .github/workflows/issue-manager.yml

            env:
              GITHUB_CONTEXT: ${{ toJson(github) }}
            run: echo "$GITHUB_CONTEXT"
          - uses: tiangolo/issue-manager@0.5.0
            with:
              token: ${{ secrets.FASTAPI_ISSUE_MANAGER }}
              config: >
                {
                  "answered": {
                    "delay": 864000,
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 30 18:46:56 GMT 2024
    - 1.1K bytes
    - Viewed (0)
Back to top