pysignalr
Modern, reliable and async-ready client for SignalR protocol
What it is and what it does
pysignalr is an async Python client for the SignalR protocol, a real-time communication framework used primarily by ASP.NET Core applications. It manages WebSocket connections to SignalR servers, handles message encoding/decoding via JSON or MessagePack, and provides event-driven callbacks for connection lifecycle and incoming messages. The library supports both fire-and-forget method invocations and request-reply patterns, as well as server-to-client and client-to-server streaming.
Typical use involves instantiating a SignalRClient with a server URL, registering event handlers via `.on()` methods, and running the client's connection loop. The library handles reconnection with exponential backoff, token-based authentication, custom headers, and configurable timeouts. It depends on aiohttp for HTTP operations, websockets for WebSocket transport, msgpack and orjson for message serialization.
Use it for:
- Subscribe to real-time blockchain events from a Tezos API (as shown in the documentation example with TzKT).
- Build a live dashboard that receives server-pushed updates from an ASP.NET Core SignalR hub.
- Implement client-side event handlers that respond to server notifications without polling.
- Stream data bidirectionally between a Python application and a SignalR-enabled backend service.
- Authenticate with a SignalR server using token-based access via a custom token factory function.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Async-ready client library for connecting to and communicating with SignalR servers over WebSocket, supporting message subscriptions, server invocations, and bidirectional streaming.
Yes. The package is actively maintained, production-stable, has no known vulnerabilities, and offers low installation friction. It fills a clear need for Python developers integrating with SignalR servers. The permissive MIT license and broad Python version support (3.10–3.14) make it a straightforward choice for real-time communication scenarios.
Install
pysignalr on PyPI
pip
pip install pysignalruv
uv add pysignalrpoetry
poetry add pysignalrInstalling pysignalr
Before you install
Low friction installation as a pure-Python wheel. Actively maintained with recent commits and production-stable status. Requires Python 3.10 or later.
License in practice
Licensed under MIT (permissive), allowing use in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install pysignalr
from pysignalr.client import SignalRClient
import asyncio
async def on_message(msg):
print(f'Received: {msg}')
async def main():
client = SignalRClient('wss://example.com/hub')
client.on('event_name', on_message)
await client.run()
asyncio.run(main())
Requires Python 3.10 or later; target SignalR server must be accessible and support the SignalR protocol.
Verify before relying
- Whether the library supports SignalR protocol versions beyond the default (e.g., protocol version negotiation details)
- Performance characteristics under high message volume or with large payloads
- Compatibility with specific ASP.NET Core SignalR server versions
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — aiohttp, msgpack, orjson, websockets |
| Maintenance | actively maintained — 119 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 639,222/month — #5,615 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pysignalr-1.3.2-py3-none-any.whl
Keywords: asp, asyncio, client, json, messagepack, signalr, websockets
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
signalrcoreA Python client library for connecting to…
unclear · top 15,000 on PyPI
websocket-clientwebsocket-client provides a Python WebSocket…
permissive · top 1,000 on PyPI
azure-mgmt-signalrManages Azure SignalR resources—creation,…
permissive · top 5,000 on PyPI
simple-websocketProvides a straightforward WebSocket server and…
permissive · top 1,000 on PyPI
wslinkwslink provides bi-directional websocket…
permissive · top 5,000 on PyPI
amqpPure-Python AMQP 0.9.1 client library for…
permissive · top 1,000 on PyPI
pyqwestA Python HTTP client wrapping the Rust reqwest…
permissive · top 5,000 on PyPI
websocketswebsockets is a library for building WebSocket…
permissive · top 100 on PyPI
ws4pyws4py implements the WebSocket protocol (RFC…
permissive · top 15,000 on PyPI
websocketProvides WebSocket protocol support for…
permissive · top 15,000 on PyPI