Settings.config_file_name
This commit is contained in:
parent
1b24861e48
commit
270de7f87c
2 changed files with 3 additions and 2 deletions
|
@ -29,6 +29,7 @@ class Settings(BaseSettings):
|
||||||
|
|
||||||
production_mode: bool = False
|
production_mode: bool = False
|
||||||
data_dir: Path = Path("./tmp")
|
data_dir: Path = Path("./tmp")
|
||||||
|
config_file_name: Path = Path("config.json")
|
||||||
api_v1_prefix: str = "api/v1"
|
api_v1_prefix: str = "api/v1"
|
||||||
openapi_url: str = "/openapi.json"
|
openapi_url: str = "/openapi.json"
|
||||||
docs_url: str | None = "/docs"
|
docs_url: str | None = "/docs"
|
||||||
|
@ -42,7 +43,7 @@ class Settings(BaseSettings):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def config_file(self) -> Path:
|
def config_file(self) -> Path:
|
||||||
return self.data_dir.joinpath("config.json")
|
return self.data_dir.joinpath(self.config_file_name)
|
||||||
|
|
||||||
|
|
||||||
class DBType(Enum):
|
class DBType(Enum):
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Database connection management
|
Database connection management.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sqlmodel import Session, SQLModel, create_engine
|
from sqlmodel import Session, SQLModel, create_engine
|
||||||
|
|
Loading…
Reference in a new issue