skillfed

o365

O365 - Microsoft Graph and Office 365 API made easy

o365 v2.1.9 4.3M downloads/30d#2,342 on PyPI
Permissive license AGING released

What it is and what it does

O365 is a Python wrapper around Microsoft Graph and Office 365 REST APIs that abstracts away the complexity of OAuth, API pagination, timezone handling, and resource navigation. It lets you work with Office 365 resources—email, calendar, contacts, OneDrive, SharePoint—using straightforward Python objects and methods rather than raw HTTP calls.

The library handles common operational details automatically: OAuth token refresh, conversion between local and server datetimes, pagination through custom iterators, and switching between shared mailboxes or other users' resources. It includes a query helper for building OData filters and supports modular API components for extending functionality. The package is in production/stable status and supports Python 3.10 through 3.13.

Use it for:

  • Automate email sending and retrieval from Office 365 mailboxes without managing OAuth or API pagination manually.
  • Build calendar applications that sync with Outlook, handling timezone conversion and recurring events automatically.
  • Access and manage SharePoint or OneDrive files programmatically from Python applications.
  • Create bots or integrations that read contacts or send notifications through Office 365 accounts.
  • Migrate or backup email and calendar data from Office 365 to other systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

O365 provides a Pythonic interface to Microsoft Graph and Office 365 APIs, enabling access to email, calendar, contacts, OneDrive, and SharePoint resources through a single abstraction layer.

Yes, if you need to integrate Office 365 resources into a Python application and want to avoid raw API calls. The library is mature, permissively licensed, and has low install friction. The 196-day release gap suggests a slower maintenance pace, so verify that active community support or your own maintenance capacity aligns with your project's needs before committing to it for mission-critical systems.

Install

o365 on PyPI

pip

pip install o365

uv

uv add o365

poetry

poetry add o365

Installing o365

Before you install

Low install friction with six well-maintained runtime dependencies. The package is in production/stable status and supports modern Python versions (3.10–3.13), though it has been 196 days since the last release, suggesting a maintenance pace that may be slower than some actively developed alternatives.

License in practice

Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions, making it suitable for most projects without legal friction.

Quickstart

from O365 import Account

credentials = ('client_id', 'client_secret')
account = Account(credentials)
m = account.new_message()
m.to.add('recipient@example.com')
m.subject = 'Test'
m.body = 'Message body'
m.send()

Requires Microsoft OAuth credentials (client_id and client_secret) registered with Azure; automatic token refresh is handled by the library.

Verify before relying

  • Extent of Microsoft Graph API coverage beyond the documented features (email, calendar, contacts, OneDrive, SharePoint).
  • Performance characteristics and rate-limiting behavior under high-volume scenarios.
  • Community activity and responsiveness to issues given the 196-day release gap.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — beautifulsoup4, msal, python-dateutil, requests, tzdata, tzlocal
Maintenance aging — 196 days since the last release
First released
Downloads 4,285,402/month — #2,342 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: o365-2.1.9-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

microsoft graph python clientoffice 365 api wrapperoutlook email calendar pythonsharepoint onedrive pythonmicrosoft 365 rest apioffice 365 oauth pythonexchange online python client
office-365microsoft-graphoauth

More Internet packages