SignalR core client
This signalr core client is forked from mandrewcito. The main difference is the replacement of the synchronous websocket-client library by the asynchronous websockets library. Additionally, all methods have been made asynchronous.
See https://github.com/mandrewcito/signalrcore for a general introduction.
See the following samples to get an idea of the changes:
import asyncio
from signalrcore_async.hub_connection_builder import HubConnectionBuilder
from signalrcore_async.protocol.msgpack import MessagePackHubProtocol
async def main():
protocol = "ws"
host = "localhost"
port = "8080"
hub = "hub"
hub_url = f"{protocol}://{host}:{port}/{hub}"
connection = HubConnectionBuilder()\
.with_url(hub_url)\
# optional: use MessagePack instead of json protocol
.with_hub_protocol(MessagePackHubProtocol())\
.build()
try:
# start connection
await connection.start()
# send (fire and forget)
connection.send("SendName", "R2D2")
# invoke (wait for return value)
sum_value = await connection.invoke("Sum", [1, 2])
print(sum_value)
# register callback
connection.on("OnProgressChanged", _on_progress_changed)
# stream
await connection.stream("StreamData", [1, 2], _on_next)
finally:
# close connection
await connection.stop()
def _on_next(data):
pass # do something with the streamed data
def _on_progress_changed(self, args):
progress = args[0]
print(f"Progress: {progress * 100:.0f}%")
# run main task
asyncio.run(main())
Metadata
Release files for signalrcore-async 0.5.4
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 | Actions |
|---|---|---|---|---|
| signalrcore-async-0.5.4.tar.gz | 12.3 kB | Without provenance | Details for signalrcore-async-0.5.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| signalrcore_async-0.5.4-py3-none-any.whl | Python 3 | none | any | Details for signalrcore_async-0.5.4-py3-none-any.whl |
Total release size: 28.5 kB
Release files / signalrcore-async-0.5.4.tar.gz
| Download URL | signalrcore-async-0.5.4.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60e662633ca09666786f56849385fde6aa81ec95a08f20a737f886145546c5b0
|
|
BLAKE2b-256 checksum How to use checksums |
9634af6947d602b070126be51c1157c473ccbed47b9c96305f76b8359f52cc5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
|
Release files / signalrcore_async-0.5.4-py3-none-any.whl
| Download URL | signalrcore_async-0.5.4-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
875a1d085281bdec19b6421a77355290e84645b8b5c14002126ec3bc3d8ede51
|
|
BLAKE2b-256 checksum How to use checksums |
6064904689cfc3e5fdfe291c1e11df0aa6e1a6b40785acaf6f308e8c5492bf8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
|
Security for signalrcore-async 0.5.4
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.