Skip to main content

Run a RPC server by the most convenient way

Project description

Pyrpcd is a RPC server, implemented by tornado framework. Expose all functions of a python module in current directory. Use voxe as data transporting protocol.

Usage

Install:

python -m pyrpcd.server hello

hello.py

def print_hello():
        print('hello ...')

def remote_add(a, b):
        return a + b

main.py

import requests
import voxe

response = requests.post('http://127.0.0.1:8080/rpc/print_hello')
response = requests.post('http://127.0.0.1:8080/rpc/remote_add', voxe.dumps(2, 3))
print(voxe.loads(response.content))

Run:

python main.py

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

pyrpcd-0.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrpcd-0.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrpcd-0.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pyrpcd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4b05f39ee8c77cff8f499dbd38f87446f860d8bb39c85f2dff490098fb29dd1f
MD5 a3129cb4af1874a50ab91b67adbb6b3f
BLAKE2b-256 a39b586ca39494c932165dd78aa84f502253c5203cda4f79a31c23a34d589c5b

See more details on using hashes here.

File details

Details for the file pyrpcd-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyrpcd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pyrpcd-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ccdf8a5c93ab1cf8adac166ecc743a39fc759add08c66024eff23e8e1b4d1247
MD5 ccfe1b57100360b65413cd18a15b2554
BLAKE2b-256 2aea9a702d3fd91d41e23d2d76d02dc4fa606948b16271e13f7673038c554c4a

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