Install & Compatibility
Where this runs
tested against v4.17.1 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 45.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 46MB
45MB installed
● package 45MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
StreamingHttpClient
✓ from botframework.streaming import StreamingHttpClient
✗ from botframework.streaming import StreamingHttpClient
This quickstart demonstrates setting up an `aiohttp` web server to expose a Bot Framework `CloudAdapter`, which internally uses components that leverage `botframework-streaming` for communication. This is the standard way a Python bot would listen for incoming activities, implicitly using streaming capabilities for various channels. Note that the SDK is EOL.
import asyncio
import os
from aiohttp import web
from botbuilder.core import TurnContext, MessageFactory
from botbuilder.integration.aiohttp import CloudAdapter, ConfigurationBotFrameworkAuthentication
from botbuilder.schema import Activity
# NOTE: This example demonstrates how a bot setup would typically use
# components that internally rely on `botframework-streaming` for communication.
# As the SDK is EOL, this is for historical context.
# Create a simple bot for demonstration
class MyEchoBot:
async def on_turn(self, turn_context: TurnContext):
if turn_context.activity.type == 'message' and turn_context.activity.text:
await turn_context.send_activity(MessageFactory.text(f"You said: {turn_context.activity.text}"))
else:
await turn_context.send_activity(f"[{turn_context.activity.type} event detected]")
# Configuration and Adapter setup
app_id = os.environ.get('MicrosoftAppId', '') # Get from environment or config
app_password = os.environ.get('MicrosoftAppPassword', '') # Get from environment or config
# Setup Bot Framework Authentication
# For local testing without credentials, pass None for MicrosoftAppId and MicrosoftAppPassword
auth = ConfigurationBotFrameworkAuthentication(
MicrosoftAppId=app_id,
MicrosoftAppPassword=app_password
)
adapter = CloudAdapter(auth)
# Instantiate the bot
bot = MyEchoBot()
async def messages(req: web.Request):
# For authenticated requests (e.g., from Azure Bot Service)
if 'Authorization' in req.headers:
response = await adapter.process(req, bot)
if response:
return web.Response(status=response.status, headers=response.headers, body=response.body)
else:
# Simplified handling for local testing without authentication.
# In production, authentication is required.
try:
activity = await req.json()
activity = Activity().deserialize(activity)
turn_context = TurnContext(adapter, activity)
await bot.on_turn(turn_context)
return web.Response(status=200)
except Exception as e:
print(f"Error processing request: {e}")
return web.Response(status=500, text=str(e))
return web.Response(status=202)
async def main():
web_app = web.Application()
web_app.router.add_post('/api/messages', messages)
runner = web.AppRunner(web_app)
await runner.setup()
site = web.TCPSite(runner, 'localhost', 3978)
await site.start()
print("Bot listening on http://localhost:3978/api/messages")
while True:
await asyncio.sleep(3600)
if __name__ == '__main__':
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Bot stopped.")
Upgrade
Version history
4.17.1latest on PyPI · released Jan 5, 2026
Audit
Dependencies
botbuilder-schemarequiredProvides the activity and bot framework schema definitions.
botbuilder-integration-aiohttprequiredIntegrates the Bot Framework Adapter with aiohttp for web server functionality, which leverages this streaming library.
msrestrequiredMicrosoft REST client runtime, used for HTTP communication.