Web & Protocols · zero-dependency · MIT

larzrpc

JSON-RPC 2.0 over HTTP.

A JSON-RPC 2.0 server and client — @method registration, transport-agnostic dispatch, batches, notifications, a threaded HTTP server and a WSGI app, with attribute-style client calls.

larzscript pkg install rpc
View on GitHub →Learn the stack

What you get

Try it

import "rpc" as rpc
let srv = rpc.server()
rpc.register(srv, "add", fn(params) { return params[0] + params[1] })
let req = rpc.request("add", [2, 3], 1)
print(rpc.dispatch(srv, req))
Output
{jsonrpc: 2.0, result: 5, id: 1}

Why it's in the Larz Stack

larzrpc is a real Larzscript package (larzscript pkg install rpc) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.