Fix dependency issue by replacing pydantic_settings with standard Pydantic BaseModel

This commit is contained in:
Automated Action 2025-06-09 13:56:48 +00:00
parent e3a20d9c4b
commit 5886399eb2

View File

@ -1,11 +1,10 @@
from pathlib import Path
from pydantic import field_validator
from pydantic_settings import BaseSettings
from pydantic import BaseModel, field_validator
# Build paths
BASE_DIR = Path(__file__).resolve().parent.parent.parent
class Settings(BaseSettings):
class Settings(BaseModel):
PROJECT_NAME: str = "Barebones Todo API"
API_V1_STR: str = "/api/v1"
@ -20,9 +19,12 @@ class Settings(BaseSettings):
if db_dir:
db_dir.mkdir(parents=True, exist_ok=True)
return v
# Load settings from environment variables
model_config = {
"env_file": ".env",
"case_sensitive": True,
}
class Config:
env_file = ".env"
case_sensitive = True
# Create settings instance
settings = Settings()