JSON-RPC v2.0 for Trio
This project provides an implementation of JSON-RPC v 2.0 based on sansio-jsonrpc with all of the I/O implemented using the Trio asynchronous framework.
Quick Start
Install from PyPI:
$ pip install trio-jsonrpc
The following example shows a basic JSON-RPC client.
from trio_jsonrpc import open_jsonrpc_ws, JsonRpcException
async def main():
async with open_jsonrpc_ws('ws://example.com/') as client:
try:
result = await client.request(
method='open_vault_door',
{'employee': 'Mark', 'pin': 1234}
)
print('vault open:', result['vault_open'])
await client.notify(method='hello_world')
except JsonRpcException as jre:
print('RPC failed:', jre)
trio.run(main)
For more information, see the complete documentation.
Metadata
Release files for trio-jsonrpc 0.4.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 |
|---|---|---|---|---|
| trio-jsonrpc-0.4.0.tar.gz | 11.5 kB | Without provenance | Details for trio-jsonrpc-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trio_jsonrpc-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for trio_jsonrpc-0.4.0-py3-none-any.whl |
Total release size: 24.1 kB
Release files / trio-jsonrpc-0.4.0.tar.gz
| Download URL | trio-jsonrpc-0.4.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0100b65960af87f869585877c08fd99018d22adacc1b0a77e905b21dd07199a
|
|
BLAKE2b-256 checksum How to use checksums |
ad995b9981f1f77c34b3b98fb48ade0046061cfd235f86bc3aac6d518b629ebc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.5 Linux/5.3.0-51-generic
|
Release files / trio_jsonrpc-0.4.0-py3-none-any.whl
| Download URL | trio_jsonrpc-0.4.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da75d350b775d8efb794b340788cf9b744806619e5ddd44cc8367e8511b53d0a
|
|
BLAKE2b-256 checksum How to use checksums |
58b66210a6f27d1340efbec7297fed00ba58c6613b86f07f58d4be1b6317ebf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.5 Linux/5.3.0-51-generic
|
Security for trio-jsonrpc 0.4.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.