Follow these steps to set up and run the project on your local machine:
Install the required Python packages using pip:
pip install -r requirements.txtTo set up your database, follow these steps:
-
Open the
create_database/create_tables.pyfile and locate the database configuration section:# Database configuration DB_HOST = 'your_db_host' DB_USER = 'your_db_username' DB_PASSWORD = 'your_db_password' DB_NAME = 'event_management'
-
Open a terminal and navigate to the project directory.
-
Execute the script using the following command:
python create_tables.py
To start the application, follow these steps:
-
Open the
routes/__init__.pyfile and locate the database configuration section:# Database configuration DB_HOST = 'your_db_host' DB_USER = 'your_db_username' DB_PASSWORD = 'your_db_password' DB_NAME = 'event_management'
-
Open a terminal and navigate to the project directory.
-
Execute the script using the following command:
python app.py
To insert dummy data via API:
-
Make sure that app.py is running.
-
Open a terminal and navigate to the create_database folder.
-
Execute the script using the following command:
python insert_dummy_data.py
Note: While inserting into
Membership, you might see some errors on the terminal, this is due to existingGroupadmins, so there is nothing wrong with those errors.
Once the application is running, you can access the Swagger documentation to explore the API:
- If the browser does not open automatically, manually navigate to the following URL:
http://127.0.0.1:5000/docs-
The Swagger UI will display a list of available API endpoints, including their request methods, parameters, and example responses.
-
Use the Swagger interface to test the API directly by sending requests and viewing responses.
If the Swagger UI does not load, ensure that:
- The
app.pyfile is running without errors.