initializer service deployed and tested
This commit is contained in:
25
api_services/api_controllers/redis/config.py
Normal file
25
api_services/api_controllers/redis/config.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user