Skip to main content

No project description provided

Project description

Fluid JSON-RPC

Turn any function signatures into JSON-RPC requests.

import requests

from fluid import JSONRPC


dispatcher = JSONRPC(url="")
dispatcher.session = requests.Session()

@dispatcher.dispatch(name="methodName")
def method_name(foo: str, bar: int):
    pass

...

result = method_name(foo="value", bar=1)

"""
The call above will make a POST request on the URL with the parameters passed:

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "methodName",
  "params": {
      "foo": "value",
      "bar": 1
  }
}
"""

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

fluid-jsonrpc-0.0.1.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

fluid_jsonrpc-0.0.1-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page