A Python client for Microsoft Teams' consumer chat API
Python 100%
<1%

README.md

Teamsy #

A Python client for Microsoft Teams' consumer chat API (teams.live.com), the backend inherited from classic Skype.

Consumer accounts only. Teams accounts tied to a work or school (Microsoft 365) organization use a different API this library doesn't target.

What's here #

  • auth / device_code: OAuth device-code sign-in and skypetoken refresh.
  • conversations: list conversations, fetch one, list a thread's members.
  • messages: list and send messages in a conversation.
  • reactions: add/remove an "emotion" reaction, and parse the raw reaction shape off a message.
  • attachments: parse a message's file/image attachments, and download their content via Microsoft Graph.
  • models: plain dataclasses (Conversation, Message, Attachment) that the above return.

Bring your own aiohttp.ClientSession, every function takes one as its first argument rather than this library owning its own connection pool, so it plugs into whatever's already managing HTTP for your application.