Skip to main content

To make RPC clients and servers with Python

Project description

Introduction

It is a Python package to make Hobby-RPC clients and servers.

To install:

pip install hobbyrpc

Clients

A usage example:

from hobbyrpc import Client

# via tcp
call = Client(
    address='http://127.0.0.1:8080',
    token="authorization token",
)

# or via unix socket
call = Client(
    address='/tmp/path/to/rpc.socket',
    token="authorization token",
)

output = call('SomeNullaryFunction')
output = call('SomeUnaryFunction', **input)

# a call to Compile that compiles CoffeeScript code to JavaScript
output = call(
    'Compile',
    code='answer = 42',
    bare=True,
)

input and output are Python objects serializable to and deserializable from JSON.

Servers

Not implemented yet.

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

hobbyrpc-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

hobbyrpc-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file hobbyrpc-0.1.0.tar.gz.

File metadata

  • Download URL: hobbyrpc-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hobbyrpc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4910974f796616aaa5f1180e37e02a2fdab912d2372755a86ca9767a579d3952
MD5 a5bffcce4d0f6d0cfe6d783757baa2f9
BLAKE2b-256 dc645cebd2441877b553661c9c3f8e76d4cc59d87c8bc8794dbdb24475f314f2

See more details on using hashes here.

File details

Details for the file hobbyrpc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hobbyrpc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hobbyrpc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fe74a68520a455a4acc44add917c26a370c2688fecdfebe998734fe9b57555c
MD5 fe2b5605e5f3ae07a18c3e61a70f3d35
BLAKE2b-256 f408cda906f385aa6d54132545cf4c8e5497438121117150c863822482520614

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