skillfed

pysignalr

Modern, reliable and async-ready client for SignalR protocol

pysignalr v1.3.2 639.2K downloads/30d#5,615 on PyPI32
Permissive license Active released

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 pysignalr

uv

uv add pysignalr

poetry

poetry add pysignalr

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Application FrameworksTyping :: Typed

Tags

signalr client pythonasync websocket signalrreal-time messaging clientsignalr protocol implementationasp.net core signalr pythonwebsocket event streamingbidirectional server communication
real-time-communicationwebsocket-clientasync-io

More Application Frameworks packages