This project leverages the Gmail API and a database to play with your emails. This README will guide you through the prerequisites, installation, and setup process to get the project running on your local machine.
Before you begin, ensure you have met the following requirements:
-
Gmail API Setup:
- Follow the instructions provided at the Gmail API Quickstart for Python to set up the Gmail API.
- Ensure you have the
credentials.json
file, which is required for authentication. Keep a note of the path of the file.
-
Database Setup:
- Create a database and a role with login permission and note the host, username, password, port and database name.
-
Install Python Package:
- Clone the repository from GitHub:
git clone https://github.com/rohan2921/mail_box.git
- Navigate to the project directory:
cd mail_box
- Install the required Python packages using pip:
pip install -r requirements.txt
- Clone the repository from GitHub:
To run the project, follow these steps:
-
Initialize the Database:
- Add the database url E.g: "postgresql://scp:[email protected]:5432/mail_box" to DATABASE_URL in db_helpers module in mail_box package.
- Then run the following command from teh root
alembic upgrade head
-
Using the functionality:
- Look at the example.py to understand the usage of the package.