jeremyephron / simplegmail

A simple Gmail API client for applications in Python
MIT License
352 stars 74 forks source link

Add resultSizeEstimate property #65

Open rasa opened 2 years ago

rasa commented 2 years ago

This can work along with the maxResults property to see how many results there are without downloading them all:

gmail = Gmail()
gmail.maxResults = 1
messages = gmail.get_messages(query='example')
print("There are %d estimated results" % gmail.resultSizeEstimate)