Skip to main content

pypi actions uv Ruff downloads clinicedc

download-gmail-pdf

Download PDF attachments from one or more Gmail accounts via IMAP.

Source code: https://github.com/erikvw/download-gmail-pdfs

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_pdfs-0.2.1.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_pdfs-0.2.1-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file download_gmail_pdfs-0.2.1.tar.gz.

File metadata

  • Download URL: download_gmail_pdfs-0.2.1.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_pdfs-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b9c7545f66327bdc2b7028870655272163f79007f1b8de6a065b76ffe9bf9355
MD5 b79d99b614ed331e1e4def6f6362848d
BLAKE2b-256 f25abc1046b3b50f864ba2b6ae225cd6537e7db691f1032e47e8830822ec7f70

See more details on using hashes here.

File details

Details for the file download_gmail_pdfs-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: download_gmail_pdfs-0.2.1-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_pdfs-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80dd58f421bde71bff9dc41c9efacb8be13107774e8747234bcc0c8978792ca7
MD5 2b079e6ec6c8e6c2d1065be39121b48e
BLAKE2b-256 8ccfdde0f4b558b9052afcc72266d1c7b989475235aeb45139ba64e3c57e5a99

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