We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 970717f commit fde24f2Copy full SHA for fde24f2
README.md
@@ -13,19 +13,13 @@ Process incoming JSON-RPC requests in Python.
13
14
To serve JSON-RPC methods:
15
```python
16
-from jsonrpcserver import Success, method, serve, dispatch
+from jsonrpcserver import dispatch, method, Success
17
18
@method
19
def ping():
20
return Success("pong")
21
22
-if __name__ == "__main__":
23
- serve()
24
-```
25
-
26
-To get a JSON-RPC response:
27
-```python
28
-dispatch('{"jsonrpc": "2.0", "method": "ping", "id": 1}')
+response = dispatch('{"jsonrpc": "2.0", "method": "ping", "id": 1}')
29
# '{"jsonrpc": "2.0", "result": "pong", "id": 1}'
30
```
31
0 commit comments