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

Uploaded Python 3

File details

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

File metadata

  • Download URL: download_gmail_pdfs-0.2.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_pdfs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9f994d0bc11013357a55d962fef66f59de3689b47631ddce0c04b3f69e1a4314
MD5 522093a7c89f2c496aba50d0e92b1d9a
BLAKE2b-256 4dcbe16ebf1e5575fedac965dcd87b14382910f4f1e26a1845440f6127c997ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: download_gmail_pdfs-0.2.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_pdfs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d480b41cf173de2eacf36a390a01943c5e082ddc61738a59132642015aaa0738
MD5 4ea17982e77a1057115a02610c76fa56
BLAKE2b-256 a0774a5d526bd3e3962703ecf03ca61e7965e9812f418e646d99f88129fca0a3

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