first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic import Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
||||
|
||||
app_name: str = "RF Propagation API"
|
||||
api_v1_prefix: str = "/api/v1"
|
||||
database_url: str = "postgresql+psycopg://radio:radio@postgis:5432/radio"
|
||||
redis_url: str = "redis://redis:6379/0"
|
||||
dem_path: Path = Field(default=Path("/data/dem"))
|
||||
landcover_path: Path = Field(default=Path("/data/landcover"))
|
||||
canopy_path: Path = Field(default=Path("/data/canopy"))
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user