from pydantic_settings import BaseSettings, SettingsConfigDict


class Configs(BaseSettings):
    """
    Redis configuration settings.
    """

    HOST: str = "10.10.2.15"
    PASSWORD: str = "your_strong_password_here"
    PORT: int = 6379
    DB: int = 0

    def as_dict(self):
        return dict(
            host=self.HOST,
            password=self.PASSWORD,
            port=int(self.PORT),
            db=self.DB,
        )

    model_config = SettingsConfigDict(env_prefix="REDIS_")


redis_configs = Configs()  #  singleton instance of the REDIS configuration settings
