refactor: remove old .env and config.py files
Remove deprecated app/core/config.py as configuration is now managed through the new YAML-based config module (app/config/). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
from sqlalchemy.engine import URL
|
|
||||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
|
||||||
SQL_SERVER_HOST: str
|
|
||||||
SQL_SERVER_PORT: int = 1433
|
|
||||||
SQL_SERVER_DATABASE: str
|
|
||||||
SQL_SERVER_USERNAME: str
|
|
||||||
SQL_SERVER_PASSWORD: str
|
|
||||||
SQL_SERVER_DRIVER: str = "{ODBC Driver 18 for SQL Server}"
|
|
||||||
SQL_SERVER_TRUST_SERVER_CERTIFICATE: str = "yes"
|
|
||||||
|
|
||||||
@property
|
|
||||||
def database_url(self) -> URL:
|
|
||||||
return URL.create(
|
|
||||||
"mssql+pyodbc",
|
|
||||||
username=self.SQL_SERVER_USERNAME,
|
|
||||||
password=self.SQL_SERVER_PASSWORD,
|
|
||||||
host=self.SQL_SERVER_HOST,
|
|
||||||
port=self.SQL_SERVER_PORT,
|
|
||||||
database=self.SQL_SERVER_DATABASE,
|
|
||||||
query={
|
|
||||||
"driver": self.SQL_SERVER_DRIVER.strip("{}"),
|
|
||||||
"TrustServerCertificate": self.SQL_SERVER_TRUST_SERVER_CERTIFICATE,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
||||||
|
|
||||||
|
|
||||||
settings = Settings()
|
|
||||||
Reference in New Issue
Block a user