dingtalk-stream
A Python library for sending messages to DingTalk chatbot
Decision gist · record as of 2026-08-14
Yes, if you are building a DingTalk chatbot or event handler in Python. The SDK is actively maintained, has low install friction, uses a permissive MIT license, and is classified as Alpha development status. No known vulnerabilities. The main gotcha is that you must obtain DingTalk credentials and understand that Stream Mode requires a persistent WebSocket connection rather than stateless HTTP webhooks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires DingTalk app credentials (client_id and client_secret) from https://open-dev.digntalk.com; Stream Mode connection is WebSocket-based and requires network access to DingTalk servers.
- Low install friction with a pure-Python wheel.
- Actively maintained as of 2026-07-30 with 173 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2025-10-24 (294 days) · last repo commit 2026-07-30 · 173 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 793,984 downloads/mo, #5,039 on PyPI
Alternatives
Verify before relying
pip install dingtalk-stream
import dingtalk_stream
credential = dingtalk_stream.Credential(client_id, client_secret)
client = dingtalk_stream.DingTalkStreamClient(credential)
client.register_callback_handler(dingtalk_stream.chatbot.ChatbotMessage.TOPIC, handler)
client.start_forever()- Whether Python 3.6 and 3.7 support (listed in classifiers) is actively tested or maintained given the active status.
- Performance characteristics under high message volume or concurrent callback handlers.
- Whether the package handles automatic reconnection and backoff after network failures, or if manual restart is always required.
What it is and what it does
dingtalk-stream is a Python SDK that implements DingTalk's Stream Mode protocol for building chatbots and event handlers. Instead of polling or managing webhooks, it opens a persistent WebSocket connection to DingTalk's servers and receives events (messages, callbacks, card interactions) asynchronously. You define handler classes that process incoming events and send replies back through the same connection.
The SDK wraps the async complexity: you write a handler class with a process() method, register it with a DingTalkStreamClient, and call start_forever() to begin listening. It handles credential management, WebSocket lifecycle, and message acknowledgment. The library depends on aiohttp, requests, and websockets for its HTTP and WebSocket transport layers.
Use it for
- Build a DingTalk chatbot that responds to user messages in real time without setting up external webhooks or polling.
- Handle card callback events (button clicks, form submissions) from DingTalk cards sent by your application.
- Integrate DingTalk event notifications into an existing asyncio application using client.start() instead of start_forever().
- Process multiple event types (messages, callbacks, approvals) by registering different handler classes for each topic.
- Deploy a stateless bot that maintains a single persistent connection to DingTalk rather than multiple HTTP endpoints.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building a DingTalk chatbot or event handler in Python.
The SDK is actively maintained, has low install friction, uses a permissive MIT license, and is classified as Alpha development status. No known vulnerabilities. The main gotcha is that you must obtain DingTalk credentials and understand that Stream Mode requires a persistent WebSocket connection rather than stateless HTTP webhooks.
Install
dingtalk-stream on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-07-30 with 173 repository stars. Depends on aiohttp, requests, and websockets for async HTTP and WebSocket communication.
Requires DingTalk app credentials (client_id and client_secret) from https://open-dev.digntalk.com; Stream Mode connection is WebSocket-based and requires network access to DingTalk servers.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install dingtalk-stream
import dingtalk_stream
credential = dingtalk_stream.Credential(client_id, client_secret)
client = dingtalk_stream.DingTalkStreamClient(credential)
client.register_callback_handler(dingtalk_stream.chatbot.ChatbotMessage.TOPIC, handler)
client.start_forever()
Verify before relying
- Whether Python 3.6 and 3.7 support (listed in classifiers) is actively tested or maintained given the active status.
- Performance characteristics under high message volume or concurrent callback handlers.
- Whether the package handles automatic reconnection and backoff after network failures, or if manual restart is always required.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesaiohttprequestswebsockets |
| Maintenance | Actively maintained 294 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 793,984 / month, #5,039 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: dingtalk_stream-0.24.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dingtalk chatbot sdk”
- dingtalk-streamPython SDK for building DingTalk chatbots and event handlers using…
- alibabacloud-dingtalkPython SDK for integrating with Alibaba Cloud's DingTalk platform,…
- alibabacloud-gateway-dingtalkProvides a gateway client for integrating with Alibaba Cloud's…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also alibabacloud-dingtalk · line-bot-sdk · alibabacloud-gateway-dingtalk · apache-airflow-providers-dingding · pytest-messenger · jeedomdaemon · slackweb · fbmessenger · wecom-aibot-python-sdk · stream-chat