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

Uploaded Python 3

File details

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

File metadata

  • Download URL: download_gmail_pdfs-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 881f5a0e98e9000063e0821561195158eb1b41f1e612a4c46f84a434f58c6292
MD5 35d9426cae066796234ed4a10677a475
BLAKE2b-256 4777b9ddacf93534ee83b0d12c684c0e83fb8c3c8015784fdbae02139fab1052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: download_gmail_pdfs-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b668f763fde33fe48e1c5f4371d23f98ac45a1d1233e87ea5283394909da95ba
MD5 4a5f1e1ac9263edd7e6bbaf43cb0e044
BLAKE2b-256 96cd272a85b8f762ba7feda85bda900744be2a1fe8ba7d4f8fbbfc2f0dd6b346

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