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)
Metadata
Release files for outlooklib 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| outlooklib-0.1.12.tar.gz | 1.8 MB | Without provenance | Details for outlooklib-0.1.12.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| outlooklib-0.1.12-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for outlooklib-0.1.12-cp310-abi3-win_amd64.whl |
| outlooklib-0.1.12-cp310-abi3-manylinux_2_39_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.39+ ARM64 | Details for outlooklib-0.1.12-cp310-abi3-manylinux_2_39_aarch64.whl |
| outlooklib-0.1.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for outlooklib-0.1.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| outlooklib-0.1.12-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for outlooklib-0.1.12-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 9.7 MB
Release files / outlooklib-0.1.12.tar.gz
| Download URL | outlooklib-0.1.12.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab25bac2526c5cd4203b60f68df37b0219cec039685fbfeaf6ddbbc716e49b9a
|
|
BLAKE2b-256 checksum How to use checksums |
1c74c28e0c83f8fdd1f894f7ee8ece53042ffef58412083e0e42a6cb46068071
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / outlooklib-0.1.12-cp310-abi3-win_amd64.whl
| Download URL | outlooklib-0.1.12-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
67ccec26a2cacdba04b0f58a3528b87ea69e590c059aa8a5d785d7251bb1f877
|
|
BLAKE2b-256 checksum How to use checksums |
7730f94710846ea49a8c34f5c7c3467c5e76abea1bc7a2c7b0a1889339b615de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / outlooklib-0.1.12-cp310-abi3-manylinux_2_39_aarch64.whl
| Download URL | outlooklib-0.1.12-cp310-abi3-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1cc5f777e8a8102f1644ee288f67827d7f2985beeaea2cf9998057022c6a08db
|
|
BLAKE2b-256 checksum How to use checksums |
fcb19f4a67653c89c68165f0e61d476b9ff5ea7b0c7a02e1e9b8146d9421e8ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / outlooklib-0.1.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | outlooklib-0.1.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fb5ac8c0de10da784560444a48719b87c633e0f396979bee161acad9de3999af
|
|
BLAKE2b-256 checksum How to use checksums |
061df37396cf5f5e7ace3a8794b3bd8668aff9b1e32691fdc82d37dcfe95b1e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / outlooklib-0.1.12-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | outlooklib-0.1.12-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b33cd0470de9eedb4f3249604203abe6e762df335dfaa4eac120bebd5ccd9372
|
|
BLAKE2b-256 checksum How to use checksums |
13a462c4dc86fc9aa2c11c46bc820cc097c28bc2bfb30171aa3671c1a558a17b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for outlooklib 0.1.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.