Registry / communication / msteamsapi

msteamsapi

JSON →
library0.9.5pypypi✓ verified 84d ago

msteamsapi is a Python wrapper for sending AdaptiveCards to Microsoft Teams via webhooks. Current version 0.9.5 supports Python 2.7+ and 3.9+. Release cadence is irregular; last release was in 2023.

pip install msteamsapi
INSTALL
IMPORT
SIG · MSTEAMSAPI
M
msteamsapi
communicationpythonv0.9.5
Install
2.2s avg
Import
597ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.624s · 21.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.2s · import 0.570s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TeamsWebhook
from msteamsapi import TeamsWebhook
AdaptiveCard
from msteamsapi import AdaptiveCard

Send a simple text message to a Teams channel using a webhook URL.

from msteamsapi import TeamsWebhook import os webhook_url = os.environ.get('TEAMS_WEBHOOK_URL', '') webhook = TeamsWebhook(url=webhook_url) webhook.send_text('Hello from msteamsapi!')
Debug
Known issues
deprecatedPython 2 support is deprecated, though still present. Future versions may drop it.
fix
Use Python 3.9+ and upgrade to newer versions when available.
affects: <=0.9.5
gotchaThe library uses 'url' parameter name, not 'webhook_url'. Common mistake.
fix
Use keyword argument 'url=' when initializing TeamsWebhook.
affects: all
gotchaAdaptiveCards must be properly formatted; the library does not validate card structure. Malformed cards will fail silently.
fix
Test your card JSON with the Microsoft AdaptiveCard designer before sending.
affects: all
Errors
Common errors & fixes
AttributeError: module 'msteamsapi' has no attribute 'TeamsWebhook'
Incorrect import path, e.g., from msteamsapi import msteamsapi
fix
Use: from msteamsapi import TeamsWebhook
TypeError: __init__() missing 1 required positional argument: 'url'
Instantiating TeamsWebhook without providing the webhook URL.
fix
Pass the URL as a string: TeamsWebhook(url='https://outlook.office.com/webhook/...')
Upgrade
Version history
0.9.5latest on PyPI · released May 6, 2025
Audit
Dependencies
requestsrequiredHTTP client for sending webhooks
Agent activity
32 hits · last 30 days
node
30
OpenAI (training)
1
Resources
msteamsapi — pip install msteamsapi · libregistry