Skip to main content

lightweight rpc framework

Project description

Lightweight Remote Procedure Call framework. Only two components are of importance:

RpcServer

A long-running server, where callables can be registered.

remote_call

A single-use client, to call procedures on an RpcServer.

Overview

On the server side, you can define and register callables. These are then exposed by name:

def pingpong(*args, **kwargs):
    return args, kwargs

with RpcServer(23000) as server:
    server.register(pingpong)
    server.run()

On the client side, you can directly dispatch a remote_call. This will block until a reply is available:

remote_call('localhost', 23000, 'pingpong', 'hello', 'world')

About

This is a simple RPC library, primarily for prototyping and education setups. It uses a JSON based protocol, which protects against undesired code execution. Any complex protocols, such as packed or pickle based data, can be implemented on top.

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

rpconnect-0.10.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file rpconnect-0.10.0.tar.gz.

File metadata

  • Download URL: rpconnect-0.10.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpconnect-0.10.0.tar.gz
Algorithm Hash digest
SHA256 2f440669ad1b060e41c6a4de9f7799b23271d891f0d9a6f515e59bafcc2c4ff0
MD5 df14c7aa22076a8c9784994f3065cfe0
BLAKE2b-256 649f2095f5ffd4cdb545abd5978fe073bd0fc2193a3660cb41b09df8ee311ee7

See more details on using hashes here.

Supported by

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