Microsoft Outlook client package powered by Rust and PyO3.
Project description
outlooklib
Microsoft Outlook client package for Python using Microsoft Graph.
Installation
pip install outlooklib
Usage
import outlooklib
outlook = outlooklib.Outlook(
client_id="<client-id>",
tenant_id="<tenant-id>",
client_secret="<client-secret>",
client_email="team.mailbox@company.com",
client_folder="Inbox",
)
# List folders
response = outlook.list_folders()
if response.status_code == 200:
print(response.content)
# List unread messages
response = outlook.list_messages(filter="isRead ne true")
if response.status_code == 200:
print(response.content)
# Move message to another folder
response = outlook.move_message(id="<message-id>", to="<folder-id>")
if response.status_code == 201:
print("Message moved")
# Delete message
response = outlook.delete_message(id="<message-id>")
if response.status_code == 204:
print("Message deleted")
# Download attachments from a message
response = outlook.download_message_attachment(
id="<message-id>",
path=r"C:\\Temp\\attachments",
index=True,
)
if response.status_code == 200:
print("Attachments downloaded")
# Send HTML email with optional attachments
response = outlook.send_message(
recipients=["person@example.com"],
subject="Status update",
message="<p>Hello team,</p><p>All good.</p>",
attachments=None,
)
if response.status_code in (200, 202):
print("Email sent")
# Change working context
outlook.change_folder("Inbox")
outlook.change_client_email("another.mailbox@company.com")
For technical and contributor documentation, see DEV.md.
Version
Recommended way to read the installed package version:
from importlib.metadata import version
print(version("outlooklib"))
Convenience attribute (also available):
import outlooklib
print(outlooklib.__version__)
Licence
BSD-3-Clause Licence (see LICENSE)
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 Distributions
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 outlooklib-0.1.11.tar.gz.
File metadata
- Download URL: outlooklib-0.1.11.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76c14e51aafbbb29bf4f52c9b14781403ad6680aac5e371d61c42397c82428d9
|
|
| MD5 |
57258366c5134604071382539939671a
|
|
| BLAKE2b-256 |
78ea04d1783109703ac0d30286c04ab3226cded610f6a6e3fe29eb55ea850682
|
File details
Details for the file outlooklib-0.1.11-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: outlooklib-0.1.11-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58ca8dbdd85c1aa7e29b37800529ef8709ad9e1e5c36b7ab4d27cb3cbde1c6bf
|
|
| MD5 |
4d0bb3769e136448d23ae70dd5ba9cb8
|
|
| BLAKE2b-256 |
0327dc79bd9bbaabe7ec709dea3d16f124062e99ac5bf8599b735e0dcc7a9184
|
File details
Details for the file outlooklib-0.1.11-cp310-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: outlooklib-0.1.11-cp310-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5161b090c9cfe04ae4dfe89bc06c9dfc91586cb84b9a1ad75b6512868c54553
|
|
| MD5 |
0c5529091b1ae11c79e2e61255e182dd
|
|
| BLAKE2b-256 |
006fd600868c50351b61738c7139e32c310a56e14116cbb3c9617148344717c2
|
File details
Details for the file outlooklib-0.1.11-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: outlooklib-0.1.11-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e491bb227453b6e7fb05abb600beee40054978f76dce3aa2a7cc1216927865d8
|
|
| MD5 |
71c9ab0f9af153228a21e647b3009a9f
|
|
| BLAKE2b-256 |
18dc290daba5a6e07aebe1231627a46dbf6ddb73c26f81435929f95f18bbf765
|