Spaces:
Runtime error
Runtime error
File size: 564 Bytes
2ecc792 5cd9bab 21bfd6f 5cd9bab dce75a4 9875759 2ecc792 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
"""Config class for handling env variables.
"""
from functools import lru_cache
from pydantic import BaseSettings
class Settings(BaseSettings):
HOSTNAME: str
DATABASE: str
UID: str
PASSWORD: str
ALGORITHM:str
JWT_SECRET_KEY:str
JWT_REFRESH_SECRET_KEY:str
JWT_VERIFICATION_SECRET_KEY:str
GOOGLE_API_KEY:str
MAIL_SERVER_URL:str
MAIL_USERNAME:str
MAIL_PASSWORD:str
MAIL_FROM:str
class Config:
env_file = ".env"
@lru_cache()
def get_settings():
return Settings()
config = get_settings()
|