- Python 3.8 or higher
- Python
venv
package - PostgreSQL
-
Clone the repository:
git clone <repository_url> cd <repository_name>
-
Create a virtual environment using
venv
:python3 -m venv venv
-
Activate the virtual environment:
- For Linux:
source venv/bin/activate
- For Windows:
venv\Scripts\activate
- For Linux:
-
Install Poetry:
pip install poetry
-
Install project dependencies using Poetry:
poetry install
-
Navigate to the
database
directory:cd database
-
Ensure you have already created a PostgreSQL database.
-
Import the SQL file using
psql
:psql -U <username> -d <dbname> < filename.sql
Replace
<username>
with your PostgreSQL username,<dbname>
with the name of your database, andfilename.sql
with the SQL file to import. -
Copy and paste the
.env.template
file located in the root of the project and rename it to.env
. -
Edit the following environment variables in the
.env
file with your PostgreSQL configuration:POSTGRES_NAME
POSTGRES_HOST
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_PORT
To start the project, run the following command:
uvicorn app.main:app --reload --host 127.0.0.1 --port 8080
Now the project is running http://localhost:8080