From 5a8adf1d9c792915f93e0feea1a690c2ae56ed63 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Tue, 13 May 2025 23:29:26 +0000 Subject: [PATCH] Add pydantic-settings package to requirements.txt --- __init__.py | 1 + alembic/env.py | 1 + main.py | 8 +++++++- requirements.txt | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..da06b93 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +# Make this directory a Python package to help with imports \ No newline at end of file diff --git a/alembic/env.py b/alembic/env.py index c908228..96cc4ba 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -11,6 +11,7 @@ from alembic import context # Add the project root directory to Python's path BASE_DIR = Path(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(str(BASE_DIR)) +sys.path.insert(0, str(BASE_DIR)) # Make sure the project root is first in path # this is the Alembic Config object, which provides # access to the values within the .ini file in use. diff --git a/main.py b/main.py index 7a41f37..55a53b8 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,13 @@ +import sys +import os +from pathlib import Path from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import uvicorn -from pathlib import Path + +# Add the project root to the Python path +BASE_DIR = Path(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, str(BASE_DIR)) from app.api.routes import router as api_router from app.core.config import settings diff --git a/requirements.txt b/requirements.txt index 60b7917..b6b8bd3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ fastapi>=0.95.0 uvicorn>=0.22.0 pydantic>=2.0.0 +pydantic-settings>=2.0.0 sqlalchemy>=2.0.0 alembic>=1.11.0 python-dotenv>=1.0.0