SocketSignal — Python client
Gravicode Studios, led by Kang Fadhil.
Bidirectional RPC over WebSockets, on asyncio.
pip install websockets
python example.py # needs a server: dotnet run --project ../../src/SocketSignal.Demo -- serve
import asyncio
from socketsignal import SocketSignalClient
async def main():
client = SocketSignalClient(call_timeout=10.0, auto_reconnect=True)
@client.on("serverHello")
async def hello(text):
return "python heard you"
await client.connect("ws://localhost:8080/ws/")
print(await client.call("sum", 5, 7)) # 12
await client.send("log", "no reply wanted")
await client.close()
asyncio.run(main())
| Register | client.on("name", handler) or @client.on("name"); sync or async |
| Call | await client.call("name", *args) |
| Fire and forget | await client.send("name", *args) |
| Errors | SignalInvocationError, SignalTimeoutError, SignalClosedError |
Full guide: docs/clients.md · Protocol: docs/protocol.md
Metadata
Release files for socketsignal 2.0.0
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 |
|---|---|---|---|---|
| socketsignal-2.0.0.tar.gz | 6.0 kB | Without provenance | Details for socketsignal-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| socketsignal-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for socketsignal-2.0.0-py3-none-any.whl |
Total release size: 12.5 kB
Release files / socketsignal-2.0.0.tar.gz
| Download URL | socketsignal-2.0.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dea5d090f60355136952e83c7a2f33f091f5774822457270b7df15385899fe7
|
|
BLAKE2b-256 checksum How to use checksums |
655e4d0857567e780edd237c772f745bb9aad5e15d2de27f55673912b651ab3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / socketsignal-2.0.0-py3-none-any.whl
| Download URL | socketsignal-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b7b416384399754b1c9720933336c1cbbfd33fbfcbe666e516f940ef1ffca82
|
|
BLAKE2b-256 checksum How to use checksums |
dca7d636137b6de4f4937f8905a0c56d032a33003f140a756e0d0d6f89882a54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for socketsignal 2.0.0
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.