From 4857a0347c81ec617d1c1cc6cd07a4a48fe66167 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Sat, 31 May 2025 14:57:04 +0000 Subject: [PATCH] Fix ModuleNotFoundError for pydantic_settings by using standard pydantic --- app/core/config.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/core/config.py b/app/core/config.py index f7f8414..61dc660 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -1,10 +1,10 @@ import os from pathlib import Path -from pydantic_settings import BaseSettings +from pydantic import BaseModel -class Settings(BaseSettings): +class Settings(BaseModel): PROJECT_NAME: str = "Notes API" API_V1_STR: str = "/api/v1" @@ -20,8 +20,10 @@ class Settings(BaseSettings): # CORS CORS_ORIGINS: list[str] = ["*"] - class Config: - env_file = ".env" - case_sensitive = True + model_config = { + "env_file": ".env", + "case_sensitive": True, + } + settings = Settings()