Fix deployment error with pydantic_settings
- Add pydantic-settings to requirements.txt - Update config.py to handle missing pydantic_settings module - Use fallback to regular pydantic BaseSettings if pydantic_settings is not available
This commit is contained in:
parent
b0d71975a9
commit
163b82dab7
@ -1,6 +1,10 @@
|
||||
from pathlib import Path
|
||||
|
||||
# Try to import from pydantic_settings, fall back to pydantic if not available
|
||||
try:
|
||||
from pydantic_settings import BaseSettings
|
||||
except ImportError:
|
||||
from pydantic import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
|
@ -3,5 +3,6 @@ uvicorn>=0.15.0
|
||||
sqlalchemy>=1.4.0
|
||||
alembic>=1.7.0
|
||||
pydantic>=2.0.0
|
||||
pydantic-settings>=2.0.0
|
||||
python-dotenv>=0.19.0
|
||||
ruff>=0.0.270
|
Loading…
x
Reference in New Issue
Block a user