autobahn
WebSocket client & server library, WAMP real-time framework
What it is and what it does
Autobahn is a mature WebSocket and WAMP framework for Python that runs on both Twisted and asyncio. It implements RFC6455 WebSocket and the WAMP protocol, which layers remote procedure calls and publish-subscribe messaging on top of WebSocket. You use it to build real-time client and server applications that need bidirectional communication—either plain WebSocket for simple messaging or WAMP when you need structured RPC and pub-sub patterns. The library supports both CPython and PyPy, includes TLS and proxy support, and passes the Autobahn Testsuite for standards conformance.
The package has 9 runtime dependencies, including cryptography, cffi, msgpack, and cbor2, which add moderate install friction but provide serialization and security features out of the box. It requires Python 3.11 or later and is actively maintained with recent releases. The MIT license is permissive for commercial use.
Use it for:
- Build real-time chat or notification systems where clients and servers exchange messages over a persistent WebSocket connection.
- Implement distributed RPC and pub-sub messaging using WAMP when you need a routed protocol with a central message broker.
- Create live dashboards or monitoring tools that push updates to multiple clients simultaneously without polling.
- Develop IoT applications where devices communicate asynchronously with a central server or peer-to-peer.
- Integrate WebSocket support into existing Twisted or asyncio applications for bidirectional communication.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Autobahn provides WebSocket and WAMP (Web Application Messaging Protocol) implementations for Python, enabling bidirectional real-time messaging and remote procedure calls over WebSocket on Twisted and asyncio.
Yes. Autobahn is a stable, actively maintained library with no known vulnerabilities, permissive licensing, and broad platform support. Install it if you need WebSocket or WAMP for real-time messaging. The 9 dependencies add moderate friction, but wheels are available for modern Python versions. Be aware that versions after v25.6.1 may include AI-assisted code—review the AI policy if that is a concern for your project.
Install
autobahn on PyPI
pip
pip install autobahnuv
uv add autobahnpoetry
poetry add autobahnInstalling autobahn
Before you install
Medium install friction due to 9 runtime dependencies including cryptography and cffi, but wheels are available for modern Python versions (3.11–3.14) across common platforms. Maintenance is active with a release 30 days old and 2541 repository stars.
License in practice
MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install autobahn
from autobahn.twisted.websocket import WebSocketServerProtocol
class MyServerProtocol(WebSocketServerProtocol):
def onMessage(self, payload, isBinary):
self.sendMessage(payload, isBinary)
Requires Python 3.11 or later; Twisted or asyncio event loop must be configured to run the server.
Verify before relying
- Performance characteristics and throughput limits under typical production loads.
- Compatibility guarantees with specific versions of Twisted and asyncio.
- Details on the AI policy change in versions after v25.6.1 and its impact on code quality or licensing.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 9 — cbor2, cffi, cryptography, hyperlink, importlib-resources, msgpack, txaio, u-msgpack-python, ujson |
| Maintenance | actively maintained — 30 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,114,678/month — #1,783 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: autobahn-26.7.1-cp311-cp311-macosx_15_0_arm64.whl; autobahn-26.7.1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; autobahn-26.7.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; autobahn-26.7.1-cp311-cp311-musllinux_1_2_aarch64.whl; autobahn-26.7.1-cp311-cp311-musllinux_1_2_x86_64.whl; autobahn-26.7.1-cp311-cp311-win_amd64.whl; autobahn-26.7.1-cp312-cp312-macosx_15_0_arm64.whl; autobahn-26.7.1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; autobahn-26.7.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; autobahn-26.7.1-cp312-cp312-musllinux_1_2_aarch64.whl; autobahn-26.7.1-cp312-cp312-musllinux_1_2_x86_64.whl; autobahn-26.7.1-cp312-cp312-win_amd64.whl; autobahn-26.7.1-cp313-cp313-macosx_15_0_arm64.whl; autobahn-26.7.1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; autobahn-26.7.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; autobahn-26.7.1-cp313-cp313-musllinux_1_2_aarch64.whl; autobahn-26.7.1-cp313-cp313-musllinux_1_2_x86_64.whl; autobahn-26.7.1-cp313-cp313-win_amd64.whl; autobahn-26.7.1-cp314-cp314-macosx_15_0_arm64.whl; autobahn-26.7.1-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Keywords: asyncio, autobahn, crossbar, pubsub, realtime, rfc6455, rpc, twisted, wamp, websocket
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
ws4pyws4py implements the WebSocket protocol (RFC…
permissive · top 15,000 on PyPI
TwistedTwisted is an event-driven networking framework…
permissive · top 5,000 on PyPI
python-engineioPython implementation of the Engine.IO realtime…
permissive · top 1,000 on PyPI
wsprotowsproto is a pure-Python WebSocket protocol…
permissive · top 1,000 on PyPI
wslinkwslink provides bi-directional websocket…
permissive · top 5,000 on PyPI
trio-websocketImplements WebSocket protocol (RFC 6455) for…
permissive · top 1,000 on PyPI
Flask-SocketIOFlask-SocketIO adds real-time bidirectional…
permissive · top 5,000 on PyPI
websocketProvides WebSocket protocol support for…
permissive · top 15,000 on PyPI
gevent-websocketProvides WebSocket support for gevent-based…
unclear · top 5,000 on PyPI
daphneDaphne is an ASGI server that handles HTTP,…
permissive · top 5,000 on PyPI