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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file rmy-0.1.1.tar.gz.

File metadata

  • Download URL: rmy-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for rmy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 866b8c91d3ecdd76c8808cc5785d3bd248e6e5abf550bfc14bae2d146ef6f3ef
MD5 ddddd9b4d95655b7d7fb7281e4631ac0
BLAKE2b-256 95c0942518217b32066cf48dd1d234f3e747366b4c2e5f7e5a9664d84daf8183

See more details on using hashes here.

File details

Details for the file rmy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rmy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for rmy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7254b483c139e1acd938c5a537d6820f90aa555713d2fc526c2658870c81668
MD5 d88a7238f6d6c079483fea54cddf9fbc
BLAKE2b-256 396a1a04b1aaa448994014a0a7e7df415098af411c7a6a2e7f62784475d38832

See more details on using hashes here.

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