A minimal python3 wrapper for the Gmail API
Project description
snoozingmail
A minimal python3 wrapper for the Gmail API that exposes basic message reading, modifying, and sending capabilities.
install
pip install snoozingmail
usage
- You'll first need to create a Cloud Platform project enabled with the python Gmail API, and download the credentials.json file. To do that follow Google's quickstart
- Create a new
Snoozin
object with the path to your credentials.json file like so:snoozingmail.Snoozin("./credentials.json")
- The first instantiation of
Snoozin
with your credentials.json file will prompt you to visit a url to pick what gmail account to give snoozin access to. A token.pickle file will be then be created for automatic authentication with the chosen account for future instantiations.
example
Print message body of first starred message in inbox
import snoozingmail
snoozin = snoozingmail.Snoozin("./credentials.json")
msg_ids = snoozin.get_labeled_msgs(['STARRED', 'INBOX'])
body_text = snoozin.get_msg_body(msg_ids[0])
print(body_text)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snoozingmail-0.0.2.tar.gz
(6.0 kB
view details)
Built Distribution
File details
Details for the file snoozingmail-0.0.2.tar.gz
.
File metadata
- Download URL: snoozingmail-0.0.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
29397533aa427691bfe063fe1bf982d7c40d2b6400315ab44053deb4a1798f13
|
|
MD5 |
a60d078bf49022e85fac107149b3f10d
|
|
BLAKE2b-256 |
9ca710ce18345beb9b484b5a83a96fb79817411dbff757b3ec00ee293021f9cc
|
File details
Details for the file snoozingmail-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: snoozingmail-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4fc4c366b5398367454fda7791aa39f1b7d1295a5d70a1037ebdd001a5616e8b
|
|
MD5 |
161fc565d9e4ee5b0c312460c15beb74
|
|
BLAKE2b-256 |
8a68656751444fea37f52acc216ed81ac1accb8009426707c355aff4435b33cf
|