{"library":"python-jsonrpc-server","title":"python-jsonrpc-server","description":"A JSON RPC 2.0 server library for Python, used primarily by language servers like the Python Language Server. Current version 0.4.0, with infrequent updates. Supports concurrent request handling via futures.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install python-jsonrpc-server"],"cli":null},"imports":["from jsonrpc.manager import JSONRPC2Protocol","from jsonrpc.manager import JSONRPC2Response","from jsonrpc.manager import JSONRPC2Request","from jsonrpc.manager import JSONRPC2Error","from jsonrpc.server import JSONRPC2Server"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import asyncio\nfrom jsonrpc.server import JSONRPC2Server\nfrom jsonrpc.manager import JSONRPC2Protocol\n\nasync def handle_request(protocol, data):\n    request = protocol.parse_request(data)\n    if request.method == \"hello\":\n        response = protocol.create_response(request, \"world\")\n        return response.serialize()\n    else:\n        error = protocol.create_error_response(request, -32601, \"Method not found\")\n        return error.serialize()\n\nserver = JSONRPC2Server(handle_request)\nasyncio.run(server.run())\nprint(\"Server running on stdin/stdout\")","lang":"python","description":"Basic JSON RPC 2.0 server that reads from stdin and writes to stdout, handling a 'hello' method.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}