{"id":15520969,"url":"https://github.com/sloev/wsrpc","last_synced_at":"2025-06-17T00:36:36.010Z","repository":{"id":57468399,"uuid":"48888269","full_name":"sloev/wsrpc","owner":"sloev","description":"RPC with Websockets, python and tornado","archived":false,"fork":false,"pushed_at":"2016-01-01T20:44:04.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T23:47:34.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sloev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-01T20:13:43.000Z","updated_at":"2017-12-05T23:26:59.000Z","dependencies_parsed_at":"2022-09-19T08:41:00.997Z","dependency_job_id":null,"html_url":"https://github.com/sloev/wsrpc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fwsrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fwsrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fwsrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fwsrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloev","download_url":"https://codeload.github.com/sloev/wsrpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242762744,"owners_count":20181266,"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":[],"created_at":"2024-10-02T10:31:04.932Z","updated_at":"2025-03-09T22:45:59.502Z","avatar_url":"https://github.com/sloev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## WsRPC - RPC with python, tornado and websockets\n\nThis project is an extract from a private repository, all history has been removed and domain specific context removed aswell.\n\n### What?\n\nThis project demonstrates how an RPC thru Websockets can be constructed using Tornado Websocket handlers.\n\nThe demo project introduces a lookup dictionary with functions that get different dependencies injected.\n\nThe functions are attached to the lookup table by a decorator that also can be used at runtime.\n\nThis means that you can call:\n\n```python\nadd_to_ws_lookup(my_new_function)\n```\n\nand then a new RPCall will be available in the running Websocket. Connected Clients will not need to reconnect to see this.\n\n####JSON format\n\nThe format is:\n\n```javascript\n{\"instruction\":\"silly instruction\", \"args\":\"silly args\", \"callback_id\":\"34_callme\"}\n```\n\n**instruction** is the name of the function you call, directly the same as the func name in python.\n\n**args** can really be anything\n\n**callback_id** is a voluntary(i havent checked how volluntary :-) id that you can give in order to better differentiate when receiving the responses. Remember the Websocket is full-duplex.\n\n##How to run\ninstall dependencies (atm. only tornado):\n\n```bash\nsudo pip install -r requirements.txt\n```\n\nsee tests for dox, and run them:\n\n```bash\npython -m tornado.testing discover tests\n```\n\n##Copyright\nJohannes Gårdsted Valbjørn 2016\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloev%2Fwsrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloev%2Fwsrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloev%2Fwsrpc/lists"}