A simple python library to interact with Microsoft Graph and Office 365 API
Python
1,930
691 commits
updated Oct 5, 2026
This project aims to make interacting with the Microsoft api, and related apis, easy to do in a Pythonic way. Access to Email, Calendar, Contacts, OneDrive, Sharepoint, etc. Are easy to do in a way that feel easy and straight forward to beginners and feels just right to seasoned python programmer.
The project is currently developed and maintained by alejcas.
We are always open to new pull requests!
from O365 import Account
credentials = ('client_id', 'client_secret')
account = Account(credentials)
m = account.new_message()
m.to.add('to_example@example.com')
m.subject = 'Testing!'
m.body = "George Best quote: I've stopped drinking, but only while I'm asleep."
m.send()
This project was also a learning resource for us. This is a list of not so common python idioms used in this project:
def method(argument, *, with_name=None, **other_params):from enum import EnumOverall
Maintained
Code review
PyPI
Latest release
Releases this year
175 followers · starred Oct 2023
83 followers · starred Jul 2021
18 followers · starred May 2023
87 followers · starred Nov 2023
A simple python library to interact with Microsoft Graph and Office 365 API
Python
1,930
691 commits
updated Oct 5, 2026
This project aims to make interacting with the Microsoft api, and related apis, easy to do in a Pythonic way. Access to Email, Calendar, Contacts, OneDrive, Sharepoint, etc. Are easy to do in a way that feel easy and straight forward to beginners and feels just right to seasoned python programmer.
The project is currently developed and maintained by alejcas.
We are always open to new pull requests!
from O365 import Account
credentials = ('client_id', 'client_secret')
account = Account(credentials)
m = account.new_message()
m.to.add('to_example@example.com')
m.subject = 'Testing!'
m.body = "George Best quote: I've stopped drinking, but only while I'm asleep."
m.send()
This project was also a learning resource for us. This is a list of not so common python idioms used in this project:
def method(argument, *, with_name=None, **other_params):from enum import EnumOverall
Maintained
Code review
PyPI
Latest release
Releases this year
175 followers · starred Oct 2023
83 followers · starred Jul 2021
18 followers · starred May 2023
87 followers · starred Nov 2023