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

Uploaded Python 3

File details

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

File metadata

  • Download URL: download_gmail_pdfs-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 4d9478cdbb1b3b9f61ca21cd783a82d003ad83498718b8506e32e43f33a5e1fd
MD5 40b129af8e329aaeabca64992f71e85d
BLAKE2b-256 eefa9398a2d2f288d4510626f84c36a6956207036cc3deadc01f0dd8d698d235

See more details on using hashes here.

File details

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

File metadata

  • Download URL: download_gmail_pdfs-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c798611c2ddb13dffac3ca8d8b8be79d1ba879a668d45d8bd5ee810d6116b3d0
MD5 714a7f652ff5c8ada1df6fe5c8a4b93f
BLAKE2b-256 d9e4e26b1d63bc7b762e441e11c82483b2a4c989dc0603fa4b385989cf127e6e

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