Skip to main content

Stateful rpc for Python

Project description

A powerful PRC framework to build distributed applications easily in Python.

How to use it

One can expose a Python object through a server as follow.

class Demo:
    async def greet(self, name):
        return f"Hello {name}!"


if __name__ == "__main__":
    rmy.run_tcp_server(8080, Demo())

This object can then be remotely access to as follows.

if __name__ == "__main__":
    with rmy.create_sync_client("localhost", 8080) as client:
        proxy: Demo = client.fetch_remote_object()
        print(proxy.greet("world"))

The object returned fetch_remote_object call is an ad hoc object which has the same interface as the one that has been exposed. One can also remotely access to the object attributes and even iterate asynchronously through data returned by the shared object.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rmy-0.1.1.tar.gz (11.8 kB view hashes)

Uploaded Source

Built Distribution

rmy-0.1.1-py3-none-any.whl (13.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page