19 lines
449 B
Python
19 lines
449 B
Python
|
|
from pydantic_settings import BaseSettings
|
||
|
|
from functools import lru_cache
|
||
|
|
from config import Config
|
||
|
|
|
||
|
|
class Settings(BaseSettings):
|
||
|
|
API_V1_STR: str = "/api/v1"
|
||
|
|
PROJECT_NAME: str = "drone bot API"
|
||
|
|
VERSION: str = "1.0.0"
|
||
|
|
DESCRIPTION: str = ""
|
||
|
|
|
||
|
|
# API Key validation
|
||
|
|
API_KEY_ACCESS: str = Config.API_KEY
|
||
|
|
|
||
|
|
class Config:
|
||
|
|
case_sensitive = True
|
||
|
|
|
||
|
|
@lru_cache()
|
||
|
|
def get_settings() -> Settings:
|
||
|
|
return Settings()
|