Skip to main content

A simple RPC-framework written in Python

Project description

# PyRPC

PyRPC is a simple RPC-framework written in Python. It supports simple and fast access to remotely provided procedures by pickling (using the fast but in-secure module cPickle, see below) all data (request/response) and transporting it via TCP to the remote host.

Due to it’s nature, cPickle is not intended to be secure. Under special circumstances (e. g. malicious messages) remote executions might be possible. Therefore you must ensure that the server is only reachable by trusted clients in a secure and restricted environment (a public server is therefore absolutely not recommended).

Transmission is compressed using zlib.

## Installation

PyRPC is available at PyPI and known as fspyrpc:

pip install fspyrpc

## Usage

Using PyRPC is pretty simple. See client_example.py for client-usage. The server consists of two classes:

  • RPCServer

  • RPCServerHandler

RPCServer is used to manage all client connections; the RPCServerHandler is newly instantiated for every request. It implements all provided procedures to the client; the method name is prefixed by handle_.

Every called method has access to the following instance attributes:

  • address - contains a (ip, port)-tuple of the remote client address

  • data - provides raw access to the request as a dict-object

See server_example.py for corressponding server-usage.

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

fspyrpc-0.0.1.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file fspyrpc-0.0.1.tar.gz.

File metadata

  • Download URL: fspyrpc-0.0.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fspyrpc-0.0.1.tar.gz
Algorithm Hash digest
SHA256 774a4c99c8009f96117a271d0a19ec5c2a9e0961d49356d422a4592478dad6e3
MD5 4f09bd26da6bcd3a56afe71e83a29e09
BLAKE2b-256 2a9314e81b15842a254dcb9fbae5cb9a5a480c152d98c717f04719a0d60d8b8c

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