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.py

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.4.tar.gz (4.5 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.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrpcd-0.0.4.tar.gz
  • Upload date:
  • Size: 4.5 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.4.tar.gz
Algorithm Hash digest
SHA256 2a93c8d05b288487d58e487f4895d3edbad0f6a6bef612739fc86748ad4e7709
MD5 f66bb3a2f617c6783dbc2e8fb3ba964c
BLAKE2b-256 eba09c59fec4c8c69f2e0bda03947ce4b882e6bdf2c3b2b7c7498165e902bc6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrpcd-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f0534bb3da8ca51ea406ee6ff02af3a199dc57b2dbd45bd63a2ba65a81b545d4
MD5 af9f97286b1ea90f23a0eccd16ac8537
BLAKE2b-256 92e32678240828126d86944327e605b57baed553003c1fcb1ab52ebf1e71b8f7

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