download-gmail-pdf
Download PDF attachments from one or more Gmail accounts via IMAP.
Setup
Reads account credentials from a JSON file. Set the path via the GMAIL_ACCOUNTS_FILE env var or the –accounts-file argument.
Accounts file format (e.g. .gmail_accounts.json):
[
{"email": "account1@gmail.com", "password": "xxxx xxxx xxxx xxxx"},
{"email": "account2@gmail.com", "password": "yyyy yyyy yyyy yyyy"}
]
Usage
export GMAIL_ACCOUNTS_FILE=/path/to/accounts.json
Run for all email accounts in the JSON
uv run --dev download-gmail-pdfs \
--output-dir /path/to/pdf_downloads \
--accounts-file ~/.clinicedc/my_edc/.gmail_accounts.json
Run for one email account in the JSON
uv run --dev download-gmail-pdfs \
--email account1@gmail.com \
--output-dir /path/to/pdf_downloads \
--accounts-file ~/.clinicedc/my_edc/.gmail_accounts.json
Features
Tracks downloads in a manifest file (safe to re-run / resume).
Reconnects automatically on transient network errors (up to 3 retries).
After running this, see the management command import_labs in clinicedc.
Metadata
Release files for download-gmail-pdf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| download_gmail_pdf-0.1.0.tar.gz | 18.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| download_gmail_pdf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.2 kB
Release files / download_gmail_pdf-0.1.0.tar.gz
| Download URL | download_gmail_pdf-0.1.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec3b10ecacb3d06593bcc564485665e0abe546c5fdf3d88d34c1bfb43861ef5d
|
|
BLAKE2b-256 checksum How to use checksums |
c7fb19dfb7720d896949e4600641fe407f657ac0ad7642fee8f997d8670d1ce0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / download_gmail_pdf-0.1.0-py3-none-any.whl
| Download URL | download_gmail_pdf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb167d26ebad22000c8a13ec1e1c8a8b4f7d0d9bb4044c9d4788a7f02f8ea98a
|
|
BLAKE2b-256 checksum How to use checksums |
341ae2ebc2b71ffbd6d0410f6f3b4bcd5f1a88d88dfeaa0ea978dadcda36f7c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|