Skip to main content

Async JSON-RPC 2.0 protocol + server powered by asyncio

Project description

https://circleci.com/gh/pavlov99/ajsonrpc/tree/master.svg?style=svg Documentation Status

Lightweight JSON-RPC 2.0 protocol implementation and asynchronous server powered by asyncio. This library is a successor of json-rpc and written by the same team. It is largely compatible but there are few differences: …

Features:

  • Full JSON-RPC 2.0 Implementation, request and response classes make sure standard is followed

  • Asynchronouse response manager and asynio support via low-level Protocol

  • API server setup in 1 min

  • Vanilla Python, no dependencies.

  • Same development team as json-rpc, largely compatible code.

Installing

pip install ajsonrpc

Example server script

pipenv run async-json-rpc-server examples.methods
curl -d '{"jsonrpc": "2.0", "method": "echo", "id": 0}' http://127.0.0.1:8888

curl -d '{"jsonrpc": "2.0", "method": "mul2", "params": [2, 3], "id": 1}' http://127.0.0.1:8888

curl -d '{"jsonrpc": "2.0", "method": "say_after", "params": {"delay": 1, "what": "ajsonrpc!"}, "id": 2}' http://127.0.0.1:8888

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

ajsonrpc-0.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

ajsonrpc-0.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ajsonrpc-0.1.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for ajsonrpc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9af8cbcf9ca3b222bdfbcfdf074d2bba3d5da96a1a74e0366ab285ea1ab6ed39
MD5 192b2a90b8a03f6d1712e85aa52dd918
BLAKE2b-256 bec59f56f4d2f2f70bf3c0b048cdb87c269615cb091fe0785ec113a6fa1a85fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ajsonrpc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for ajsonrpc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42cd5e6eddb80ab0d0b14d7b4f79e9dd2cc56a1c2206b6597e2503db2baf0833
MD5 4f6c3ea2400af0940b81979ffb9d6a44
BLAKE2b-256 dd7c3a27471e64ed6be2dea87bac234f04965f06b17dde61f17dd192e4349348

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