{"id":20931900,"url":"https://github.com/shixiongfei/remrpc","last_synced_at":"2025-12-28T07:27:46.021Z","repository":{"id":62584422,"uuid":"200987697","full_name":"shixiongfei/remrpc","owner":"shixiongfei","description":"REdis Msgpack RPC","archived":false,"fork":false,"pushed_at":"2019-09-25T03:59:38.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T09:15:54.103Z","etag":null,"topics":["msgpack","redis","rpc"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/remrpc/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shixiongfei.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-07T06:34:08.000Z","updated_at":"2019-11-26T15:44:04.000Z","dependencies_parsed_at":"2022-11-03T21:38:21.913Z","dependency_job_id":null,"html_url":"https://github.com/shixiongfei/remrpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiongfei%2Fremrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiongfei%2Fremrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiongfei%2Fremrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiongfei%2Fremrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shixiongfei","download_url":"https://codeload.github.com/shixiongfei/remrpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243324504,"owners_count":20273113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["msgpack","redis","rpc"],"created_at":"2024-11-18T21:46:13.151Z","updated_at":"2025-12-28T07:27:45.967Z","avatar_url":"https://github.com/shixiongfei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"remrpc\n======\n\nREdis Msgpack RPC\n\nInstallation\n------------\n\n.. code-block:: python\n\n    pip install remrpc\n\nExample\n-------\n\n.. code-block:: python\n\n    import redis\n    import remrpc\n\n    def add(a, b):\n        return a + b\n\n    def sub(a, b):\n        return a - b\n\n    def multi():\n        return \"Hello\", \"World\"\n\n    def kvfunc(k=\"key\", v=\"val\"):\n        return \"{0} = {1}\".format(k, v)\n\n    def nonreturn():\n        print(\"Non Return\")\n\n    class CallObject:\n        def __call__(self, name):\n            return \"Hello {0}\".format(name)\n\n    if __name__ == \"__main__\":\n        pool = redis.ConnectionPool(host=\"127.0.0.1\",\n                                    port=6379,\n                                    password=\"123456\")\n        rpc1 = remrpc.RPC(redis.Redis(connection_pool=pool), \"channel:rpc1\")\n        rpc2 = remrpc.RPC(redis.Redis(connection_pool=pool), \"channel:rpc2\")\n\n        rpc1.register(add)\n        rpc1.register(sub)\n        rpc1.register(multi)\n        rpc1.register(kvfunc)\n        rpc1.register(CallObject(), 'sayhello')\n        rpc1.register(nonreturn)\n\n        try:\n            invoker = rpc2.invoker(\"channel:rpc1\")\n\n            print(invoker.add(1, 2))\n            print(invoker.sub(9, 5))\n            print(invoker.multi())\n            print(invoker.kvfunc(k=\"KEY\", v=\"VALUE\"))\n            print(invoker.sayhello(\"World\"))\n            print(invoker.nonreturn())\n            print(invoker.nonexistent())\n        except remrpc.TimedoutRPC as e:\n            print(\"\u003e RPC Timedout: {0}\".format(e))\n        except remrpc.CallErrorRPC as e:\n            print(\"\u003e RPC Call Error: {0}\".format(e))\n        except remrpc.ExceptionRPC as e:\n            print(\"\u003e RPC Exception: {0}\".format(e))\n\n        rpc1.close()\n        rpc2.close()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshixiongfei%2Fremrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshixiongfei%2Fremrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshixiongfei%2Fremrpc/lists"}