There was an error while loading. Please reload this page.
1 parent 3fec930 commit 3c2f6d7Copy full SHA for 3c2f6d7
README.md
@@ -11,6 +11,7 @@
11
12
Process incoming JSON-RPC requests in Python.
13
14
+To serve JSON-RPC requests:
15
```python
16
from jsonrpcserver import Success, method, serve
17
@@ -22,6 +23,13 @@ if __name__ == "__main__":
22
23
serve()
24
```
25
26
+Or use `dispatch`:
27
+```python
28
+>>> from jsonrpcserver import dispatch
29
+>>> dispatch('{"jsonrpc": "2.0", "method": "ping", "id": 1}')
30
+'{"jsonrpc": "2.0", "result": "pong", "id": 1}'
31
+```
32
+
33
Full documentation is at [jsonrpcserver.com](https://www.jsonrpcserver.com/).
34
35
See also: [jsonrpcclient](https://github.com/explodinglabs/jsonrpcclient)
0 commit comments