surtur
927bdd03ce
* authorization [WIP] * refactored several sections * used dict(exclude_unset=True) * global values are now sourced from a config file (statuspagerc)
20 lines
434 B
Python
20 lines
434 B
Python
from pathlib import Path
|
|
from typing import Optional
|
|
|
|
from starlette.config import Config
|
|
|
|
|
|
p: Path = Path(__file__).parents[2] / "statuspagerc"
|
|
config: Config = Config(p if p.exists() else None)
|
|
|
|
DATABASE: str = config("DATABASE", cast=str)
|
|
|
|
ALEMBIC_CONFIG: str = (
|
|
DATABASE
|
|
)
|
|
|
|
JWT_SECRET: str = config("JWT_SECRET", cast=str)
|
|
JWT_ALGORITHM: str = config("JWT_ALGORITHM", cast=str)
|
|
JWT_EXPIRY: int = config("JWT_EXPIRY", cast=int)
|
|
|