{"id":17090554,"url":"https://github.com/ticosax/pseud","last_synced_at":"2025-07-25T13:36:04.564Z","repository":{"id":12591392,"uuid":"15262202","full_name":"ticosax/pseud","owner":"ticosax","description":"Pythonic bi-directional RPC API built on top of ØMQ.","archived":false,"fork":false,"pushed_at":"2023-09-14T20:48:04.000Z","size":763,"stargazers_count":42,"open_issues_count":7,"forks_count":11,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-10T17:18:52.275Z","etag":null,"topics":["asyncio","bidirectional","curve","python","pyzmq","rpc","zeromq"],"latest_commit_sha":null,"homepage":"https://pseud.readthedocs.io/en/latest/index.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ticosax.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-17T18:16:58.000Z","updated_at":"2025-04-10T07:33:32.000Z","dependencies_parsed_at":"2024-10-20T01:36:08.862Z","dependency_job_id":null,"html_url":"https://github.com/ticosax/pseud","commit_stats":{"total_commits":272,"total_committers":11,"mean_commits":"24.727272727272727","dds":0.3308823529411765,"last_synced_commit":"26afc12ded9c1b5d726c9754b91067856ea6feb8"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticosax%2Fpseud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticosax%2Fpseud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticosax%2Fpseud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticosax%2Fpseud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ticosax","download_url":"https://codeload.github.com/ticosax/pseud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639257,"owners_count":21137811,"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":["asyncio","bidirectional","curve","python","pyzmq","rpc","zeromq"],"created_at":"2024-10-14T13:55:17.816Z","updated_at":"2025-04-12T22:28:26.691Z","avatar_url":"https://github.com/ticosax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pseud\n=====\n.. image:: https://github.com/ticosax/pseud/actions/workflows/continous-integration.yml/badge.svg\n   :target: https://github.com/ticosax/pseud/actions/workflows/continous-integration.yml\n   :alt: Continues Integration\n\n.. image:: https://codecov.io/gh/ticosax/pseud/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/ticosax/pseud\n   :alt: Coverage Status\n\n.. image:: https://readthedocs.org/projects/pseud/badge/?version=latest\n   :target: http://pseud.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\nPythonic bidirectional-rpc API built on top of ØMQ with pluggable\nencryption, authentication and heartbeating support.\n\nFeatures\n~~~~~~~~\n#. ØMQ transport layer.\n#. All native python types supported (msgpack).\n#. First citizen exceptions.\n#. Bi-bidirectional (server can initiate calls to connected clients).\n#. Encryption based on CURVE.\n#. Pluggable Authentication.\n#. Pluggable Heartbeating.\n#. Pluggable Remote Call Routing.\n#. Built-in proxy support. A server can delegate the work to another one.\n#. SyncClient (using zmq.REQ) to use within non event based processes.\n   (Heartbeating, Authentication and job execution are not supported with\n   the SyncClient.)\n\nInstallation\n~~~~~~~~~~~~\n\n.. code-block:: console\n\n   $ pip install pseud\n\n\nExecution\n~~~~~~~~~\n\nThe Server\n------------------\n\n.. code-block:: python\n\n    from pseud import Server\n\n\n    server = Server('service')\n    server.bind('tcp://127.0.0.1:5555')\n\n    @server.register_rpc\n    def hello(name):\n        return 'Hello {0}'.format(name)\n\n    await server.start()  # this will block forever\n\n\nThe Client\n------------------\n\n.. code-block:: python\n\n    from pseud import Client\n\n\n    client = Client('service', io_loop=loop)\n    client.connect('tcp://127.0.0.1:5555')\n\n    # Assume we are inside a coroutine\n    async with client:\n        response = await client.hello('Charly')\n        assert response == 'Hello Charly'\n\n\n\nThe SyncClient\n--------------\n\n.. code-block:: python\n\n   # to use within a non-asynchronous process or in a command interpreter\n   from pseud import SyncClient\n\n\n   client = SyncClient()\n   client.connect('tcp://127.0.0.1:5555')\n\n   assert client.hello('Charly') == 'Hello Charly'\n\n\n\nThe Server send a command to the client\n---------------------------------------\n\nIt is important to note that the server needs to know which\npeers are connected to it.\nThis is why the security_plugin ``trusted_peer`` comes handy.\nIt will register all peer id and be able to route messages to each of them.\n\n.. code-block:: python\n\n   from pseud import Server\n\n\n   server = Server('service', security_plugin='trusted_peer')\n   server.bind('tcp://127.0.0.1:5555')\n\n   @server.register_rpc\n   def hello(name):\n       return 'Hello {0}'.format(name)\n\n   await server.start()  # this will block forever\n\nThe client needs to send its identity to the server. This is why ``plain``\nsecurity plugin is used. The server will not check the password, he will just\ntake into consideration the user_id to perform the routing.\n\n\n.. code-block:: python\n\n   from pseud import Client\n\n\n   client = Client('service',\n                   security_plugin='plain',\n                   user_id='alice',\n                   password='')\n   client.connect('tcp://127.0.0.1:5555')\n\n   # Action that the client will perform when\n   # requested by the server.\n   @client.register_rpc(name='draw.me.a.sheep')\n   def sheep():\n       return 'beeeh'\n\n\nBack on server side, we can send to it any commands the client is able to do.\n\n.. code-block:: python\n\n    # assume we are inside a coroutine\n    sheep = await server.send_to('alice').draw.me.a.sheep()\n    assert sheep == 'beeeh'\n\n\nDocumentation\n~~~~~~~~~~~~~\n`Pseud on Readthedocs \u003chttps://pseud.readthedocs.io/en/latest/index.html\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticosax%2Fpseud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticosax%2Fpseud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticosax%2Fpseud/lists"}