Async JSON-RPC 2.0 protocol + server powered by asyncio
Project description
Lightweight JSON-RPC 2.0 protocol implementation and asynchronous server powered by asyncio. This library is a successor of json-rpc and written by the same team. It is largely compatible but there are few differences: …
Features:
Full JSON-RPC 2.0 Implementation, request and response classes make sure standard is followed
Asynchronouse response manager and asynio support via low-level Protocol
API server setup in 1 min
Vanilla Python, no dependencies.
Same development team as json-rpc, largely compatible code.
Installing
pip install ajsonrpc
Example server script
pipenv run async-json-rpc-server examples.methods
curl -d '{"jsonrpc": "2.0", "method": "echo", "id": 0}' http://127.0.0.1:8888
curl -d '{"jsonrpc": "2.0", "method": "mul2", "params": [2, 3], "id": 1}' http://127.0.0.1:8888
curl -d '{"jsonrpc": "2.0", "method": "say_after", "params": {"delay": 1, "what": "ajsonrpc!"}, "id": 2}' http://127.0.0.1:8888
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ajsonrpc-0.1.0.tar.gz
(16.0 kB
view hashes)
Built Distribution
ajsonrpc-0.1.0-py3-none-any.whl
(17.4 kB
view hashes)