Today we’re announcing the general availability (GA) of Python support in the Microsoft Teams SDK. Python developers can now build Teams-native apps and agents using the same SDK surface that powers modern Teams experiences across our TypeScript and .NET stacksÂ
Get startedÂ
In your terminal:
pip install microsoft-teams-apps
Basic usage:
from microsoft_teams.apps import App, ActivityContext
from microsoft_teams.api import MessageActivity
app = App()
@app.on_message
async def handle_message(ctx: ActivityContext[MessageActivity]):
await ctx.send(f"You said: {ctx.activity.text}")
# Start the app
await app.start()
With Python support, your orchestration logic, reasoning layer, workflow automation, or domain-specific agents can now:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
- Â Participate in chats, channels, and meetings as a first-class Teams appÂ
- Â Stream responses and render adaptive cards in conversationÂ
- Â Plug into your existing Python server, agent framework, or LLM stackÂ
-  Send proactive in-conversation messages to users and groups        Â
What’s included                                       Â
The Python release ships with the capabilities developers need to move from prototype to production:Â
- Decorator-based activity routing. Handle messages, mentions, and conversation events using familiar Python decorators — no boilerplate, no custom dispatchers.
- Built-in OAuth. First-class user authentication flows are handled by the SDK, so you can focus on your app instead of token plumbing.Â
- Type-safe Microsoft Graph access. Call Microsoft Graph as the signed-in user or as the app via the user_graph and app_graph properties, with full type hints.Â
- Extensible plugin architecture. Compose middleware, telemetry, and custom behaviors into your app without modifying core SDK code.Â
Start building todayÂ
With GA support for Python, developers have a direct path to extend their services into one of the most widely used collaboration platforms in the world.Â
- Follow the quick start guide: You can create a new Teams agent in seconds. The quick start guides you through it step by step.Â
- Explore an example: Our Teams sample inventory can help you dig deeper into the code to learn more via a hands-on experience. Â
- Join the community:Â Join the discussions in the Microsoft 365 Developer Forum, share your agent ideas or ask questions on Stack Overflow, and follow our updates on the Teams developer blog. Report any issues you experience in the Teams SDK repo.
We’re excited to see what you build!Â
Learn more about the Microsoft Teams SDK.Â
0 comments
Be the first to start the discussion.