This is a FastAPI project utilizing SQLAlchemy 2 for ORM and Alembic for database migrations.
-
Clone the repository:
git clone <repository_url> cd <project_folder>
-
Install dependencies:
pip install -r requirements.txt
-
Setup environment variables:
-
Copy the provided
env.example
file to.env
:cp env.example .env
-
Modify
.env
file according to your environment configuration.
-
-
Database Setup:
- Ensure your database server is up and running.
- Modify the SQLAlchemy database URI in the
.env
file to point to your database.
-
Run Alembic Migrations:
alembic revision --autogenerate -m "create models" alembic upgrade head
This command will apply all pending migrations to your database.
Ensure that your environment is properly configured and your database is accessible.
uvicorn app.main:app --host 0.0.0.0 --port 8000