This application provides two core functionalities.
- REST API Server
- A Command line tool to synchronize
This application is designed to run on Python 3.
- Install Python 3
- Install virtualenv Link
- Extract the submission.
- cd into the
gmail_ruler
folder andpip install -r requirements.txt
will install all the dependent libraries.
- Run
python cli.py --help
for more detailed info. This package is developed using Click library. - Run
python cli.py initialize
to sync the recent emails only. To sync all the emails from your account, try it with the--all
flag.
Now, take some nap while the emails synchronize with your current database.
- Run
python cli.py server
to start the flask server. - There is only one endpoint that serves the core functionality.
- You can find few examples in the example folder that has detailed comments and a working functions using the requests library.
There are few changes in the names given to the Email model's attributes. The attributes are:
- from_email
- to_email
- subject
- content
- received_at