Skip to main content

sly logo Sly Gmail for Python

🚧 This library is an early work in progress! Breaking changes may be frequent.

🐍 For Python 3.10+

No boilerplate, async and typed Gmail access. 😋

pip install slygmail

This library does not have full coverage. Currently, the following topics are supported:

  • Sending emails
  • Sending emails with attachments

You can directly grant user tokens using the command line, covering the whole OAuth 2 grant process.


Example usage:

import asyncio
from SlyGmail import *

async def main():
    gmail = Gmail(OAuth2('test/app.json', 'test/user.json'))

    await gmail.send('person@example.com', 'test subject', 'test body')

asyncio.run(main())

Example CLI usage for getting authorized:

# WINDOWS
py -m SlyGmail grant
# MacOS or Linux
python3 -m SlyGmail grant

Granting credentials requires a Google Cloud Console account and JSON file. Please see https://docs.dunkyl.net/SlyAPI-Python/tutorial/oauth2.html for more information.

Metadata

Release files for SlyGmail 0.2.0

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

Source distribution (sdist)

Source distribution for SlyGmail 0.2.0
File Size Uploaded
SlyGmail-0.2.0.tar.gz 4.7 kB Details

Built distribution (wheel)

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

Total release size: 10.2 kB

Release files / SlyGmail-0.2.0.tar.gz

Download URL SlyGmail-0.2.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a21b9cddd47db814dff745ab64578a12b6ebc4505db14800db07230917a8084c
BLAKE2b-256 checksum
How to use checksums
77ca4334613c33bbfabf4d414827fd0db6f6c6d730ddc0b3bfe8ba94bdbf57ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / SlyGmail-0.2.0-py3-none-any.whl

Download URL SlyGmail-0.2.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6d9cdc1d34ca1ec151dfa39e70772830d3ac0ba4079b00dbb2869406b30bf0f
BLAKE2b-256 checksum
How to use checksums
523d836af608437d2ad7166c33b1224f6cdf058488834b1f0ac3279117fb227a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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