<img
alt="jsonrpcserver"
style="margin: 0 auto;"
src="https://github.com/explodinglabs/jsonrpcserver/blob/main/docs/logo.png?raw=true"
/>
![PyPI](https://img.shields.io/pypi/v/jsonrpcserver.svg)
![Code Quality](https://github.com/explodinglabs/jsonrpcserver/actions/workflows/code-quality.yml/badge.svg)
![Coverage Status](https://coveralls.io/repos/github/explodinglabs/jsonrpcserver/badge.svg?branch=main)
![Downloads](https://img.shields.io/pypi/dw/jsonrpcserver)
Process incoming JSON-RPC requests in Python.
```python
from jsonrpcserver import method, serve, Success
@method
def ping():
return Success("pong")
if __name__ == "__main__":
serve()
```
Or use `dispatch` instead of `serve`:
```python
response = dispatch('{"jsonrpc": "2.0", "method": "ping", "id": 1}')
# => '{"jsonrpc": "2.0", "result": "pong", "id": 1}'
```
[Watch a video on how to use it.](https://www.youtube.com/watch?v=3_BMmgJaFHQ)
Full documentation is at [jsonrpcserver.com](https://www.jsonrpcserver.com/).
See also: [jsonrpcclient](https://github.com/explodinglabs/jsonrpcclient)
Raw data
{
"_id": null,
"home_page": "https://github.com/explodinglabs/jsonrpcserver",
"name": "jsonrpcserver",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Beau Barker",
"author_email": "beau@explodinglabs.com",
"download_url": "https://files.pythonhosted.org/packages/e3/3b/8d4d4fe8c59a1a4d1e6edd6126ec118b989510fadf262950a5c4f4bca664/jsonrpcserver-5.0.9.tar.gz",
"platform": null,
"description": "<img\n alt=\"jsonrpcserver\"\n style=\"margin: 0 auto;\"\n src=\"https://github.com/explodinglabs/jsonrpcserver/blob/main/docs/logo.png?raw=true\"\n/>\n\n![PyPI](https://img.shields.io/pypi/v/jsonrpcserver.svg)\n![Code Quality](https://github.com/explodinglabs/jsonrpcserver/actions/workflows/code-quality.yml/badge.svg)\n![Coverage Status](https://coveralls.io/repos/github/explodinglabs/jsonrpcserver/badge.svg?branch=main)\n![Downloads](https://img.shields.io/pypi/dw/jsonrpcserver)\n\nProcess incoming JSON-RPC requests in Python.\n\n```python\nfrom jsonrpcserver import method, serve, Success\n\n@method\ndef ping():\n return Success(\"pong\")\n\nif __name__ == \"__main__\":\n serve()\n```\n\nOr use `dispatch` instead of `serve`:\n```python\nresponse = dispatch('{\"jsonrpc\": \"2.0\", \"method\": \"ping\", \"id\": 1}')\n# => '{\"jsonrpc\": \"2.0\", \"result\": \"pong\", \"id\": 1}'\n```\n\n[Watch a video on how to use it.](https://www.youtube.com/watch?v=3_BMmgJaFHQ)\n\nFull documentation is at [jsonrpcserver.com](https://www.jsonrpcserver.com/).\n\nSee also: [jsonrpcclient](https://github.com/explodinglabs/jsonrpcclient)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Process JSON-RPC requests",
"version": "5.0.9",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a408fbf850561e0be7a686970118d838",
"sha256": "a71fb2cfa18541c80935f60987f92755d94d74141248c7438847b96eee5c4482"
},
"downloads": -1,
"filename": "jsonrpcserver-5.0.9.tar.gz",
"has_sig": false,
"md5_digest": "a408fbf850561e0be7a686970118d838",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14506,
"upload_time": "2022-09-15T02:28:24",
"upload_time_iso_8601": "2022-09-15T02:28:24.004948Z",
"url": "https://files.pythonhosted.org/packages/e3/3b/8d4d4fe8c59a1a4d1e6edd6126ec118b989510fadf262950a5c4f4bca664/jsonrpcserver-5.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-15 02:28:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "explodinglabs",
"github_project": "jsonrpcserver",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "jsonrpcserver"
}