Gmail Backup
Project description
# Gmail Backup
This is a small command-line tool that backs up your Gmail.
It downloads your email messages as [RFC822](http://www.w3.org/Protocols/rfc822/) format *.eml text files, which are compatible with most email clients.
## Installation
This requires Python 2.7.
You can install dependencies using this command:
pip install gmailbackup
## Command Line Usage
Download all email messages into the "email" directory:
./gmailbackup.py -u <username> -p <password>
Download all email messages labeled "foo" and "bar" into their own subdirectories under "mydir":
./gmailbackup.py -u <username> -p <password> -l foo,bar -o mydir
## Python Usage
To get started, use the `GmailClient` class in a `with` statement, authenticate it, then iterate any mailbox (label) you'd like.
The `GmailClient` is a simple wrapper around the IMAP4 client.
from gmailbackup import GmailClient
with GmailClient() as client:
client.authentiate('me@gmail.com', 'mypassword')
client.save_mailbox('Some Label', 'path/to/downloads')
This is a small command-line tool that backs up your Gmail.
It downloads your email messages as [RFC822](http://www.w3.org/Protocols/rfc822/) format *.eml text files, which are compatible with most email clients.
## Installation
This requires Python 2.7.
You can install dependencies using this command:
pip install gmailbackup
## Command Line Usage
Download all email messages into the "email" directory:
./gmailbackup.py -u <username> -p <password>
Download all email messages labeled "foo" and "bar" into their own subdirectories under "mydir":
./gmailbackup.py -u <username> -p <password> -l foo,bar -o mydir
## Python Usage
To get started, use the `GmailClient` class in a `with` statement, authenticate it, then iterate any mailbox (label) you'd like.
The `GmailClient` is a simple wrapper around the IMAP4 client.
from gmailbackup import GmailClient
with GmailClient() as client:
client.authentiate('me@gmail.com', 'mypassword')
client.save_mailbox('Some Label', 'path/to/downloads')
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
gmailbackup-1.0.2.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for gmailbackup-1.0.2-cp27-none-macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 158ed86b358cd667b400db6cf0c7b6730ab93ae6b8068dd8277e89ada3706b64 |
|
MD5 | 3f8eeb345861302216337956ab2a8699 |
|
BLAKE2b-256 | 057b69c129dc53f97e1f599a9a45dae06af4b23a805f876401101d44f5fb47fb |