Skip to main content

Outlook mailbox client built on Microsoft Graph with helpers for attachment processing.

Project description

nubix-outlook

Outlook mailbox client built on Microsoft Graph with helpers for fetching messages and downloading attachments.

Installation

pip install nubix-outlook

Configuration

Set environment variables (or pass arguments to the client):

  • GRAPH_CLIENT_ID
  • GRAPH_CLIENT_SECRET
  • GRAPH_TENANT_ID
  • GRAPH_MAILBOX_EMAIL

Usage

from nubix_outlook import OutlookMailboxClient, AttachmentCollector

client = OutlookMailboxClient()
collector = AttachmentCollector(client)

attachments = collector.collect_pdf_attachments(
    allowed_sender_domain="@example.com",
    download_dir="downloads",
    top=25,
    max_pages=3,
)

for message_id, files in attachments:
    print(message_id, files)

Direct mailbox actions

  • list_inbox(top=50, max_pages=1, query_params=None) explicitly fetches messages from Inbox.
  • list_messages(top=50, max_pages=1, query_params=None) fetches messages with optional paging.
  • list_messages_in_folder(folder_name, top=50, max_pages=1, query_params=None) fetches messages from a specific folder by display name.
  • get_attachments(message_id) fetches attachments for a message.
  • move_message_to_archive(message_id) moves a message to the Archive folder.
  • save_attachment(attachment, base_directory=None) saves a Graph fileAttachment to disk.

AttachmentCollector

AttachmentCollector.collect_pdf_attachments(...) downloads PDF attachments from senders matching allowed_sender_domain into per-message subdirectories under download_dir. Returns a list of tuples (message_id, [pdf_paths]).

Project details


Download files

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

Source Distribution

nubix_outlook-1.0.8.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

nubix_outlook-1.0.8-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file nubix_outlook-1.0.8.tar.gz.

File metadata

  • Download URL: nubix_outlook-1.0.8.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nubix_outlook-1.0.8.tar.gz
Algorithm Hash digest
SHA256 57534389504c37d3c3826938fc71b33201b039dc1b63e5fbe3d21d7106afd7bd
MD5 1ec212178e81208bd74a00528ce03a2a
BLAKE2b-256 1243d14aceeb0df923bf82348e9b550e43a0d56672c18c22d238c27b4817716a

See more details on using hashes here.

File details

Details for the file nubix_outlook-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: nubix_outlook-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nubix_outlook-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 09b0680bbd99c6121a3ef7cdb62f62d66534c9b9c9c1cc87724cecb950365b2a
MD5 62f8ece3dc0c04307b159b995df17b7c
BLAKE2b-256 5def8fadf25f3f0b656a0f927babe8ef128854e7cebafb60a540fa75a23fa599

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 Pingdom Monitoring Sentry Error logging StatusPage Status page