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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrpcd-0.0.3.tar.gz
  • Upload date:
  • Size: 4.4 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.3.tar.gz
Algorithm Hash digest
SHA256 b0ba1b49b2da8aa703bb33d77f53e80fd8bbd07d5146211fb515e87ad25be192
MD5 0f66ca7ff844425667fab04d691080f1
BLAKE2b-256 43394248fe6cbbc9ca07427e09df0eafdc6c3b1a4a9532db7fca76fc24b23f8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrpcd-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48101e70f2f8f546f3f4d505a84b261878f362fb7da894958cb7f7eb364fdcee
MD5 d4c38769af2b14ccc7daaef12a0fefc7
BLAKE2b-256 81a489dd0696a32233e0a8d39cbda5242f57911e6cac6aa13f2e749a8488bcbd

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