Getting the number of unread messages (by label) using the official Google Gmail API library.
Google APIs Client Library for Python
$ pip install --upgrade google-api-python-client
Get your CLIENT_SECRET_FILE
by creating a new project in the Google Developers Console
Tested on
- Debian 7.8 (wheezy) with Python 2.7.3