# Teams Bot UI
A comprehensive Python library for creating rich Microsoft Teams bot cards with Adaptive Cards support. Build interactive, visually appealing bot experiences with minimal code.
## 🚀 Features
- **Rich Card Library**: Pre-built cards for welcome messages, responses, feedback, charts, and more
- **Data Visualization**: Built-in chart support with Chart.js integration
- **Bot Management**: Multi-assistant support with easy switching capabilities
- **File Processing**: Cards for displaying file analysis and content previews
- **Feedback System**: Integrated user feedback collection with detailed forms
- **Session Management**: Track and manage conversation sessions
- **Responsive Design**: Mobile-friendly adaptive cards with modern styling
- **Backward Compatibility**: Smooth migration path with legacy function support
## 📦 Installation
```bash
pip install teams-bot-ui
```
## 🔧 Requirements
- Python 3.8+
- botbuilder-core>=4.14.0
## 🎯 Quick Start
```python
from teams_bot_ui.cards import create_welcome_adaptive_card, create_text_response_card
# Create a welcome card
welcome_card = create_welcome_adaptive_card(
user_name="John Doe",
bot_info={
"name": "My Assistant",
"logo": "https://example.com/logo.png"
}
)
# Create a response card
response_card = create_text_response_card(
response_text="Hello! How can I help you today?",
bot_info={
"name": "My Assistant",
"logo": "https://example.com/logo.png"
},
suggested_actions=[
{"title": "Ask a Question", "value": "I have a question"},
{"title": "Get Help", "value": "I need help"}
]
)
```
## 📚 Card Types
### Welcome Cards
Create engaging welcome experiences for new users:
```python
from teams_bot_ui.cards import create_enhanced_welcome_adaptive_card
card = create_enhanced_welcome_adaptive_card(
user_name="Alice",
bot_info={
"name": "Support Bot",
"logo": "https://example.com/bot-logo.png"
}
)
```
### Response Cards
Display bot responses with optional actions:
```python
from teams_bot_ui.cards import create_text_response_card
card = create_text_response_card(
response_text="Here's the information you requested...",
suggested_actions=[
{"title": "More Details", "value": "tell me more"},
{"title": "Next Steps", "value": "what's next"}
]
)
```
### Chart Cards
Visualize data with interactive charts:
```python
from teams_bot_ui.cards import create_chart_card
chart_data = {
"labels": ["Jan", "Feb", "Mar", "Apr"],
"datasets": [{
"label": "Sales",
"data": [12, 19, 3, 5],
"backgroundColor": ["#FF6384", "#36A2EB", "#FFCE56", "#4BC0C0"]
}]
}
card = create_chart_card(
title="Monthly Sales Report",
chart_data=chart_data,
chart_type="bar"
)
```
### Feedback Cards
Collect user feedback:
```python
from teams_bot_ui.cards import create_feedback_card
card = create_feedback_card(
message_id="msg_123",
bot_code="ASSISTANT_01",
session_id="session_456"
)
```
### Bot Management Cards
List and manage available assistants:
```python
from teams_bot_ui.cards import create_bot_list_card
bots = [
{
"code": "SUPPORT_BOT",
"name": "Support Assistant",
"description": "Help with technical support questions",
"logo": "https://example.com/support-logo.png"
},
{
"code": "SALES_BOT",
"name": "Sales Assistant",
"description": "Assistance with sales inquiries",
"logo": "https://example.com/sales-logo.png"
}
]
card = create_bot_list_card(bots)
```
### File Processing Cards
Display file analysis results:
```python
from teams_bot_ui.cards import create_file_analysis_card
card = create_file_analysis_card(
processing_results=file_results,
bot_info={"name": "Document Analyzer"}
)
```
### Capabilities Cards
Showcase bot features:
```python
from teams_bot_ui.cards import create_capabilities_card
features = [
{
"title": "Answer Questions",
"description": "Get detailed answers to your questions",
"icon": "https://example.com/question-icon.png"
},
{
"title": "Data Analysis",
"description": "Analyze and visualize your data",
"icon": "https://example.com/chart-icon.png"
}
]
card = create_capabilities_card(
bot_info={"name": "AI Assistant"},
features=features
)
```
## 🔄 Session Management
Track conversation sessions:
```python
from teams_bot_ui.cards import create_session_info_card
card = create_session_info_card(
bot_code="ASSISTANT_01",
bot_name="My Assistant",
session_id="session_123",
message_count=15,
start_time="2024-01-15 09:30:00"
)
```
## 🎨 UI Components
Build custom cards with reusable components:
```python
from teams_bot_ui.components import create_submit_button, create_fact_set
from teams_bot_ui.templates import base_adaptive_card, add_text_block
# Create custom card
card = base_adaptive_card()
add_text_block(card, "Custom Information", is_heading=True)
facts = create_fact_set([
{"title": "Status", "value": "Active"},
{"title": "Type", "value": "Premium"}
])
card["body"].append(facts)
```
## 📊 Chart Types
Support for multiple chart visualizations:
- **Bar Charts**: `chart_type="bar"`
- **Line Charts**: `chart_type="line"`
- **Pie Charts**: `chart_type="pie"`
```python
# Line chart example
chart_data = {
"labels": ["Week 1", "Week 2", "Week 3", "Week 4"],
"datasets": [{
"label": "Performance",
"data": [65, 59, 80, 81],
"borderColor": "#36A2EB",
"backgroundColor": "rgba(54, 162, 235, 0.2)"
}]
}
card = create_chart_card(
title="Weekly Performance",
chart_data=chart_data,
chart_type="line"
)
```
## 🔧 Advanced Usage
### Custom Bot Information
Standardize bot branding across all cards:
```python
bot_info = {
"name": "Enterprise Assistant",
"logo": "https://company.com/logo.png"
}
# Use across multiple cards
welcome = create_welcome_adaptive_card(bot_info=bot_info)
response = create_text_response_card("Hello!", bot_info=bot_info)
```
### Error Handling
Display user-friendly error messages:
```python
from teams_bot_ui.cards import create_error_card
error_card = create_error_card(
error_message="Sorry, I couldn't process your request. Please try again."
)
```
### Carousel Cards
Display multiple items in a carousel:
```python
from teams_bot_ui.cards import create_carousel_activity
items = [
{
"title": "Product A",
"subtitle": "$99.99",
"text": "Premium quality product",
"image": "https://example.com/product-a.jpg",
"buttons": [
{"title": "Learn More", "value": "product_a_details"}
]
},
{
"title": "Product B",
"subtitle": "$149.99",
"text": "Professional grade solution",
"image": "https://example.com/product-b.jpg",
"buttons": [
{"title": "Learn More", "value": "product_b_details"}
]
}
]
carousel = create_carousel_activity(items)
```
## 🔄 Migration from Legacy Code
The library maintains backward compatibility with legacy "copilot" terminology:
```python
# Legacy functions still work
from teams_bot_ui.cards import create_copilot_response_card
# Automatically maps to create_text_response_card
card = create_copilot_response_card(
response_text="Hello!",
copilot_info={"name": "Assistant"}
)
```
## 🤝 Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
### Development Setup
```bash
# Clone the repository
git clone https://github.com/shubhamshinde7995/teams-bot-ui.git
cd teams-bot-ui
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black teams_bot_ui/
```
## 📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
## 🔗 Links
- **GitHub**: https://github.com/shubham7995/teams-bot-ui
- **PyPI**: https://pypi.org/project/teams-bot-ui/
- **Issues**: https://github.com/shubham7995/teams-bot-ui/issues
- **Documentation**: https://github.com/shubham7995/teams-bot-ui#readme
## 📞 Support
- **Email**: shubhamshinde7995@gmail.com
- **GitHub Issues**: For bug reports and feature requests
## 🏷️ Keywords
`microsoft teams`, `bot`, `adaptive cards`, `ui`, `chatbot`, `assistant`, `conversation`, `bot framework`, `teams bot`, `cards`, `interactive`
---
Made with ❤️ for the Microsoft Teams development community
Raw data
{
"_id": null,
"home_page": "https://github.com/shubhamshinde7995/teams-bot-ui",
"name": "teams-bot-ui",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "microsoft teams, bot, adaptive cards, ui, chatbot, assistant, conversation, bot framework, teams bot, cards, interactive",
"author": "Shubham Shinde",
"author_email": "shubhamshinde7995@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/65/9b/2af1cf757e50a3375f5e2dbed15990c876e4a07dc7aaa23e0321da9baf7b/teams_bot_ui-1.0.3.tar.gz",
"platform": null,
"description": "# Teams Bot UI\n\nA comprehensive Python library for creating rich Microsoft Teams bot cards with Adaptive Cards support. Build interactive, visually appealing bot experiences with minimal code.\n\n## \ud83d\ude80 Features\n\n- **Rich Card Library**: Pre-built cards for welcome messages, responses, feedback, charts, and more\n- **Data Visualization**: Built-in chart support with Chart.js integration\n- **Bot Management**: Multi-assistant support with easy switching capabilities\n- **File Processing**: Cards for displaying file analysis and content previews\n- **Feedback System**: Integrated user feedback collection with detailed forms\n- **Session Management**: Track and manage conversation sessions\n- **Responsive Design**: Mobile-friendly adaptive cards with modern styling\n- **Backward Compatibility**: Smooth migration path with legacy function support\n\n## \ud83d\udce6 Installation\n\n```bash\npip install teams-bot-ui\n```\n\n## \ud83d\udd27 Requirements\n\n- Python 3.8+\n- botbuilder-core>=4.14.0\n\n## \ud83c\udfaf Quick Start\n\n```python\nfrom teams_bot_ui.cards import create_welcome_adaptive_card, create_text_response_card\n\n# Create a welcome card\nwelcome_card = create_welcome_adaptive_card(\n user_name=\"John Doe\",\n bot_info={\n \"name\": \"My Assistant\",\n \"logo\": \"https://example.com/logo.png\"\n }\n)\n\n# Create a response card\nresponse_card = create_text_response_card(\n response_text=\"Hello! How can I help you today?\",\n bot_info={\n \"name\": \"My Assistant\",\n \"logo\": \"https://example.com/logo.png\"\n },\n suggested_actions=[\n {\"title\": \"Ask a Question\", \"value\": \"I have a question\"},\n {\"title\": \"Get Help\", \"value\": \"I need help\"}\n ]\n)\n```\n\n## \ud83d\udcda Card Types\n\n### Welcome Cards\nCreate engaging welcome experiences for new users:\n\n```python\nfrom teams_bot_ui.cards import create_enhanced_welcome_adaptive_card\n\ncard = create_enhanced_welcome_adaptive_card(\n user_name=\"Alice\",\n bot_info={\n \"name\": \"Support Bot\",\n \"logo\": \"https://example.com/bot-logo.png\"\n }\n)\n```\n\n### Response Cards\nDisplay bot responses with optional actions:\n\n```python\nfrom teams_bot_ui.cards import create_text_response_card\n\ncard = create_text_response_card(\n response_text=\"Here's the information you requested...\",\n suggested_actions=[\n {\"title\": \"More Details\", \"value\": \"tell me more\"},\n {\"title\": \"Next Steps\", \"value\": \"what's next\"}\n ]\n)\n```\n\n### Chart Cards\nVisualize data with interactive charts:\n\n```python\nfrom teams_bot_ui.cards import create_chart_card\n\nchart_data = {\n \"labels\": [\"Jan\", \"Feb\", \"Mar\", \"Apr\"],\n \"datasets\": [{\n \"label\": \"Sales\",\n \"data\": [12, 19, 3, 5],\n \"backgroundColor\": [\"#FF6384\", \"#36A2EB\", \"#FFCE56\", \"#4BC0C0\"]\n }]\n}\n\ncard = create_chart_card(\n title=\"Monthly Sales Report\",\n chart_data=chart_data,\n chart_type=\"bar\"\n)\n```\n\n### Feedback Cards\nCollect user feedback:\n\n```python\nfrom teams_bot_ui.cards import create_feedback_card\n\ncard = create_feedback_card(\n message_id=\"msg_123\",\n bot_code=\"ASSISTANT_01\",\n session_id=\"session_456\"\n)\n```\n\n### Bot Management Cards\nList and manage available assistants:\n\n```python\nfrom teams_bot_ui.cards import create_bot_list_card\n\nbots = [\n {\n \"code\": \"SUPPORT_BOT\",\n \"name\": \"Support Assistant\",\n \"description\": \"Help with technical support questions\",\n \"logo\": \"https://example.com/support-logo.png\"\n },\n {\n \"code\": \"SALES_BOT\", \n \"name\": \"Sales Assistant\",\n \"description\": \"Assistance with sales inquiries\",\n \"logo\": \"https://example.com/sales-logo.png\"\n }\n]\n\ncard = create_bot_list_card(bots)\n```\n\n### File Processing Cards\nDisplay file analysis results:\n\n```python\nfrom teams_bot_ui.cards import create_file_analysis_card\n\ncard = create_file_analysis_card(\n processing_results=file_results,\n bot_info={\"name\": \"Document Analyzer\"}\n)\n```\n\n### Capabilities Cards\nShowcase bot features:\n\n```python\nfrom teams_bot_ui.cards import create_capabilities_card\n\nfeatures = [\n {\n \"title\": \"Answer Questions\",\n \"description\": \"Get detailed answers to your questions\",\n \"icon\": \"https://example.com/question-icon.png\"\n },\n {\n \"title\": \"Data Analysis\", \n \"description\": \"Analyze and visualize your data\",\n \"icon\": \"https://example.com/chart-icon.png\"\n }\n]\n\ncard = create_capabilities_card(\n bot_info={\"name\": \"AI Assistant\"},\n features=features\n)\n```\n\n## \ud83d\udd04 Session Management\n\nTrack conversation sessions:\n\n```python\nfrom teams_bot_ui.cards import create_session_info_card\n\ncard = create_session_info_card(\n bot_code=\"ASSISTANT_01\",\n bot_name=\"My Assistant\",\n session_id=\"session_123\",\n message_count=15,\n start_time=\"2024-01-15 09:30:00\"\n)\n```\n\n## \ud83c\udfa8 UI Components\n\nBuild custom cards with reusable components:\n\n```python\nfrom teams_bot_ui.components import create_submit_button, create_fact_set\nfrom teams_bot_ui.templates import base_adaptive_card, add_text_block\n\n# Create custom card\ncard = base_adaptive_card()\nadd_text_block(card, \"Custom Information\", is_heading=True)\n\nfacts = create_fact_set([\n {\"title\": \"Status\", \"value\": \"Active\"},\n {\"title\": \"Type\", \"value\": \"Premium\"}\n])\n\ncard[\"body\"].append(facts)\n```\n\n## \ud83d\udcca Chart Types\n\nSupport for multiple chart visualizations:\n\n- **Bar Charts**: `chart_type=\"bar\"`\n- **Line Charts**: `chart_type=\"line\"` \n- **Pie Charts**: `chart_type=\"pie\"`\n\n```python\n# Line chart example\nchart_data = {\n \"labels\": [\"Week 1\", \"Week 2\", \"Week 3\", \"Week 4\"],\n \"datasets\": [{\n \"label\": \"Performance\",\n \"data\": [65, 59, 80, 81],\n \"borderColor\": \"#36A2EB\",\n \"backgroundColor\": \"rgba(54, 162, 235, 0.2)\"\n }]\n}\n\ncard = create_chart_card(\n title=\"Weekly Performance\",\n chart_data=chart_data,\n chart_type=\"line\"\n)\n```\n\n## \ud83d\udd27 Advanced Usage\n\n### Custom Bot Information\nStandardize bot branding across all cards:\n\n```python\nbot_info = {\n \"name\": \"Enterprise Assistant\",\n \"logo\": \"https://company.com/logo.png\"\n}\n\n# Use across multiple cards\nwelcome = create_welcome_adaptive_card(bot_info=bot_info)\nresponse = create_text_response_card(\"Hello!\", bot_info=bot_info)\n```\n\n### Error Handling\nDisplay user-friendly error messages:\n\n```python\nfrom teams_bot_ui.cards import create_error_card\n\nerror_card = create_error_card(\n error_message=\"Sorry, I couldn't process your request. Please try again.\"\n)\n```\n\n### Carousel Cards\nDisplay multiple items in a carousel:\n\n```python\nfrom teams_bot_ui.cards import create_carousel_activity\n\nitems = [\n {\n \"title\": \"Product A\",\n \"subtitle\": \"$99.99\",\n \"text\": \"Premium quality product\",\n \"image\": \"https://example.com/product-a.jpg\",\n \"buttons\": [\n {\"title\": \"Learn More\", \"value\": \"product_a_details\"}\n ]\n },\n {\n \"title\": \"Product B\", \n \"subtitle\": \"$149.99\",\n \"text\": \"Professional grade solution\",\n \"image\": \"https://example.com/product-b.jpg\",\n \"buttons\": [\n {\"title\": \"Learn More\", \"value\": \"product_b_details\"}\n ]\n }\n]\n\ncarousel = create_carousel_activity(items)\n```\n\n## \ud83d\udd04 Migration from Legacy Code\n\nThe library maintains backward compatibility with legacy \"copilot\" terminology:\n\n```python\n# Legacy functions still work\nfrom teams_bot_ui.cards import create_copilot_response_card\n\n# Automatically maps to create_text_response_card\ncard = create_copilot_response_card(\n response_text=\"Hello!\",\n copilot_info={\"name\": \"Assistant\"}\n)\n```\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit issues, feature requests, or pull requests.\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/shubhamshinde7995/teams-bot-ui.git\ncd teams-bot-ui\n\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Format code\nblack teams_bot_ui/\n```\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## \ud83d\udd17 Links\n\n- **GitHub**: https://github.com/shubham7995/teams-bot-ui\n- **PyPI**: https://pypi.org/project/teams-bot-ui/\n- **Issues**: https://github.com/shubham7995/teams-bot-ui/issues\n- **Documentation**: https://github.com/shubham7995/teams-bot-ui#readme\n\n## \ud83d\udcde Support\n\n- **Email**: shubhamshinde7995@gmail.com\n- **GitHub Issues**: For bug reports and feature requests\n\n## \ud83c\udff7\ufe0f Keywords\n\n`microsoft teams`, `bot`, `adaptive cards`, `ui`, `chatbot`, `assistant`, `conversation`, `bot framework`, `teams bot`, `cards`, `interactive`\n\n---\n\nMade with \u2764\ufe0f for the Microsoft Teams development community\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A comprehensive Python library for creating rich Microsoft Teams bot cards with Adaptive Cards support",
"version": "1.0.3",
"project_urls": {
"Bug Tracker": "https://github.com/shubham7995/teams-bot-ui/issues",
"Documentation": "https://github.com/shubham7995/teams-bot-ui#readme",
"Download": "https://pypi.org/project/teams-bot-ui/",
"Homepage": "https://github.com/shubhamshinde7995/teams-bot-ui",
"Source": "https://github.com/shubham7995/teams-bot-ui"
},
"split_keywords": [
"microsoft teams",
" bot",
" adaptive cards",
" ui",
" chatbot",
" assistant",
" conversation",
" bot framework",
" teams bot",
" cards",
" interactive"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "86bb132205264b8f48ec01052dabba52d83b1e6e281c89021bbc63fd81f4c61a",
"md5": "fb437925125fcbae7f35726077956185",
"sha256": "bf517c347095707ab9f2b4ebdf341fb743846549f994db68a14dd069bff476a0"
},
"downloads": -1,
"filename": "teams_bot_ui-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fb437925125fcbae7f35726077956185",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 25607,
"upload_time": "2025-07-21T10:48:41",
"upload_time_iso_8601": "2025-07-21T10:48:41.478268Z",
"url": "https://files.pythonhosted.org/packages/86/bb/132205264b8f48ec01052dabba52d83b1e6e281c89021bbc63fd81f4c61a/teams_bot_ui-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "659b2af1cf757e50a3375f5e2dbed15990c876e4a07dc7aaa23e0321da9baf7b",
"md5": "4dbcb713f7b22ddedf5970916a70e5d4",
"sha256": "a237c0cd66155231011c9a01f302c5762a065d3d62ff3da945955c476e5a4456"
},
"downloads": -1,
"filename": "teams_bot_ui-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "4dbcb713f7b22ddedf5970916a70e5d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 21134,
"upload_time": "2025-07-21T10:48:42",
"upload_time_iso_8601": "2025-07-21T10:48:42.827485Z",
"url": "https://files.pythonhosted.org/packages/65/9b/2af1cf757e50a3375f5e2dbed15990c876e4a07dc7aaa23e0321da9baf7b/teams_bot_ui-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-21 10:48:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shubhamshinde7995",
"github_project": "teams-bot-ui",
"github_not_found": true,
"lcname": "teams-bot-ui"
}