Skip to main content

Pythonic Gmail client (WIP)

Features

  • [x] Clean API

  • [x] No other dependencies than standard libraries

  • [-] Supports all of the SEARCH criteria

  • [-] Supports access to all of the HEADER fields via attributes

  • [ ] Lazy loading for contents

Example

import sys
import getpass
import datetime

from gmaily import Gmaily

g = Gmaily()

user_email = input('Email: ')
user_pw = getpass.getpass()

if not g.login(user_email, user_pw):
    print('Cannot login')
    sys.exit(1)

msgs = g.inbox().after(datetime.date.today() - datetime.timedelta(weeks=2))
for msg in msgs.all():
    print('\n' + (' Mail UID: %d ' % msg.uid).center(80, '=') + '\n')
    print('Subject:', msg.subject)
    print('From:', msg.sender)
    print('Date:', msg.date)
    print('Attachments:', msg.attachments)

    print('-' * 10)
    print(msg.text)

g.logout()

Installation

Currently it requires Python 3.

$ pip install gmaily

License

MIT

Release files for gmaily 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gmaily 0.0.1
File Size Uploaded
gmaily-0.0.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gmaily 0.0.1
File Interpreter ABI Platform
gmaily-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / gmaily-0.0.1.tar.gz

Download URL gmaily-0.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
472519d59fa4403051b213a615231a00e434e19dc604d91580ba8def9503bfab
BLAKE2b-256 checksum
How to use checksums
b882f381b4b0f775ee6127982c495cd55077d2a4379ca9ecbec57b6eabbf72ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gmaily-0.0.1-py3-none-any.whl

Download URL gmaily-0.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7e778404d1b41a790603aef28c8df22da0b6d13ffafd85f21ccd688b87644ed
BLAKE2b-256 checksum
How to use checksums
cbb7991bbf9796ca49323b3c531b7139832d31bdb8e40cdb9471b02fbcc900b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page