pymsteams
Format messages and post to Microsoft Teams.
What it is and what it does
pymsteams is a Python wrapper around Microsoft Teams' webhook connector API that lets you send formatted messages to Teams channels programmatically. It abstracts the JSON structure of Teams' Connector Card format, letting you build messages with text, titles, sections, images, facts, buttons, and interactive actions through simple method calls rather than hand-crafted JSON.
The library supports both synchronous and asynchronous sending (via asyncio). You construct a connectorcard object with your webhook URL, add content and formatting through chainable methods, and call send() to post it. The package handles HTTP communication via requests and exposes the underlying response for debugging. It's commonly used for alerts, notifications, and automated reporting into Teams channels.
Use it for:
- Send deployment notifications or build alerts from CI/CD pipelines to a Teams channel.
- Post monitoring or error alerts from applications directly to a Teams channel for visibility.
- Generate formatted daily reports or summaries and deliver them to Teams automatically.
- Create interactive cards with buttons and input fields for team workflows or approvals.
- Notify teams of scheduled events, reminders, or status updates from backend systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sends formatted messages to Microsoft Teams channels via webhook connectors, supporting plain text, rich cards with sections, buttons, and interactive actions.
Yes. The package is stable (Production/Stable status), has low install friction, no known vulnerabilities, and solves a common need cleanly. The single dependency (requests) is widely trusted. The only caveat is that the project is actively seeking new maintainers, so verify that the maintenance status meets your long-term support expectations before relying on it for critical workflows.
Install
pymsteams on PyPI
pip
pip install pymsteamsuv
uv add pymsteamspoetry
poetry add pymsteamsInstalling pymsteams
Before you install
Low friction install with a single runtime dependency (requests). Active maintenance as of 2026-08-10, though the project is actively seeking new maintainers.
License in practice
Apache License 2.0 is permissive; you can use, modify, and distribute this package freely provided you include the license text and note any changes.
Quickstart
pip install pymsteams
import pymsteams
myTeamsMessage = pymsteams.connectorcard("https://your-webhook-url")
myTeamsMessage.text("this is my text")
myTeamsMessage.send()
Requires a valid Microsoft Teams webhook URL obtained from your Teams channel connector settings.
Verify before relying
- Whether async support (python 3.6+) is still available or if it requires a separate install extra.
- Current status of the maintainer search and whether active development continues beyond bug fixes.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | actively maintained — 584 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,614,634/month — #1,714 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pymsteams-0.2.5-py3-none-any.whl
Keywords: Microsoft, Teams
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
microsoft-teams-cardsProvides Pydantic-based models for building…
permissive · top 5,000 on PyPI
dhooks-liteSends messages and embeds to Discord channels…
unclear · top 15,000 on PyPI
fathom-pythonA Python SDK for the Fathom External API that…
unclear · top 15,000 on PyPI
microsoft-agents-hosting-teamsProvides Teams-specific handlers and utilities…
permissive · top 15,000 on PyPI
microsoft-teams-apiHTTP client library for Microsoft Teams Bot…
permissive · top 5,000 on PyPI
discord-webhookSend messages to Discord channels via webhooks,…
permissive · top 5,000 on PyPI
microsoft-teams-appsFramework for building Microsoft Teams…
permissive · top 15,000 on PyPI
microsoft-agents-activityProvides core types and schemas implementing…
permissive · top 5,000 on PyPI
botframework-connectorEnables Python bots to send and receive…
permissive · top 5,000 on PyPI
dagster-msteamsA Microsoft Teams integration resource for…
permissive · top 15,000 on PyPI