Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for Reconfig (0.27 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_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)
  6. 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)
  7. tests/test_datetime_custom_encoder.py

    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    def test_pydanticv1():
        class ModelWithDatetimeField(BaseModel):
            dt_field: datetime
    
            class Config:
                json_encoders = {
                    datetime: lambda dt: dt.replace(
                        microsecond=0, tzinfo=timezone.utc
                    ).isoformat()
                }
    
        app = FastAPI()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  8. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  9. docs_src/settings/app03_an/config.py

    from pydantic_settings import BaseSettings, SettingsConfigDict
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 235 bytes
    - Viewed (0)
  10. docs_src/settings/app03_an/config_pv1.py

    from pydantic import BaseSettings
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
        class Config:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 195 bytes
    - Viewed (0)
Back to top