SignalR core client (async fork)
This is asyncio version of the original SignalR Core library.
The main difference is that websocket library is replaced with asyncio-compatabile websockets.
All future changes in the original repo will be merged to this fork inheriting the major and minor version number.
Installation
pip install aiosignalrcore
Usage
Check out the docs of the original library.
The names of all modules, classes, and methods are preserved.
Async example
import asyncio
import logging
from aiosignalrcore.hub_connection_builder import HubConnectionBuilder
from aiosignalrcore.messages.completion_message import CompletionMessage
from aiosignalrcore.transport.websockets.connection import ConnectionState
hub_connection = (
HubConnectionBuilder()
.with_url('%URL%')
.with_automatic_reconnect(
{
"type": "raw",
"keep_alive_interval": 10,
"reconnect_interval": 5,
"max_attempts": 5,
}
)
.build()
)
async def on_connect():
logging.info('Connected to the server')
while hub_connection.transport.state != ConnectionState.connected:
await asyncio.sleep(0.1)
await hub_connection.send("SendMessage", [])
async def on_message(message):
pass
def on_error(self, message: CompletionMessage):
raise Exception(message.error)
hub_connection.on_open(on_connect)
hub_connection.on_error(on_error)
hub_connection.on("Message", on_message)
await hub_connection.start()
try:
while hub_connection.transport.state == ConnectionState.connected:
await asyncio.sleep(1)
except KeyboardInterrupt:
pass
finally:
await hub_connection.stop()
Metadata
Release files for aiosignalrcore 0.9.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aiosignalrcore-0.9.2.2.tar.gz | 16.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiosignalrcore-0.9.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.0 kB
Release files / aiosignalrcore-0.9.2.2.tar.gz
| Download URL | aiosignalrcore-0.9.2.2.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f4250e510c12f1b25bb8b6dedf0be87ed7b27256023d06c37d97baa5f29f495
|
|
BLAKE2b-256 checksum How to use checksums |
4c543b96fac008003c5ade2c2b0b01eba8232c81a16fa232ea6f73b0875957f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.6.14 Linux/5.8.0-1039-azure
|
Release files / aiosignalrcore-0.9.2.2-py3-none-any.whl
| Download URL | aiosignalrcore-0.9.2.2-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b2f1d6b4fe216334ba3ef53083e44213d50c86f7652682e3904300a5755c9b3
|
|
BLAKE2b-256 checksum How to use checksums |
b6749944dd5764710627867069bb5458f76794a2e789c9d068baa041dc7a58f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.6.14 Linux/5.8.0-1039-azure
|
Security for aiosignalrcore 0.9.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.