SplatNet-Backend/config.py

13 lines
No EOL
367 B
Python

from pydantic_settings import BaseSettings, SettingsConfigDict
from cryptography.fernet import Fernet
class Settings(BaseSettings):
port: int = 5000
db_url: str
fernet_key: str
cookie_httponly: bool = True
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
settings = Settings()
cipher = Fernet(settings.fernet_key.encode())