Skip to main content

pypi actions uv Ruff downloads clinicedc

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

download_gmail_pdf-0.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

download_gmail_pdf-0.1.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file download_gmail_pdf-0.1.0.tar.gz.

File metadata

  • Download URL: download_gmail_pdf-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for download_gmail_pdf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec3b10ecacb3d06593bcc564485665e0abe546c5fdf3d88d34c1bfb43861ef5d
MD5 fd01a277c83defa3b1de01f2f77bbe09
BLAKE2b-256 c7fb19dfb7720d896949e4600641fe407f657ac0ad7642fee8f997d8670d1ce0

See more details on using hashes here.

File details

Details for the file download_gmail_pdf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: download_gmail_pdf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for download_gmail_pdf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb167d26ebad22000c8a13ec1e1c8a8b4f7d0d9bb4044c9d4788a7f02f8ea98a
MD5 b8ca0245d29f899a2ca172b5cf0a1a7f
BLAKE2b-256 341ae2ebc2b71ffbd6d0410f6f3b4bcd5f1a88d88dfeaa0ea978dadcda36f7c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page