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_IDGRAPH_CLIENT_SECRETGRAPH_TENANT_IDGRAPH_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nubix_outlook-1.0.11.tar.gz.
File metadata
- Download URL: nubix_outlook-1.0.11.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b5e52a0f78b7cbd2185726ee9060cf6c42cfbccd0a157e07b8bd44f4b193878
|
|
| MD5 |
26b842d94cbf16ce4b0ab1d9eb99a74c
|
|
| BLAKE2b-256 |
7c535e10b0aae2abe2623ec30c7671b43b26fc2a5d3df9d42e2ee88950125320
|
File details
Details for the file nubix_outlook-1.0.11-py3-none-any.whl.
File metadata
- Download URL: nubix_outlook-1.0.11-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32ad528a2f415de138f66f109fa19a3cdf3a4db30060ca742b71497ec220e7a3
|
|
| MD5 |
564b060c918c3c0423cd73e9ebd7d262
|
|
| BLAKE2b-256 |
bd7904939d4f76c09216a12d62209e0dcb557689766059c39f6dac5edc1f59dc
|