skillfed

ajsonrpc

Async JSON-RPC 2.0 protocol + server powered by asyncio

ajsonrpc v1.2.0 2.1M downloads/30d#3,317 on PyPI22
Permissive license MIT Abandoned released

What it is and what it does

ajsonrpc is a lightweight, dependency-free implementation of the JSON-RPC 2.0 protocol built on asyncio. It provides core primitives (request, response, error objects), a dispatcher for mapping method names to callables, and an asynchronous manager that handles request parsing, error generation, and batch execution. The package also includes a minimal asyncio-based server that can expose Python methods directly via runtime introspection, requiring zero framework integration.

The library is designed as a successor to the json-rpc package by the same team, with similar APIs but async-first architecture. It handles both single and batch JSON-RPC requests, supports custom error classes, and offers backend adapters for Tornado, Sanic, and Quart. Because JSON-RPC 2.0 is intentionally simple (single endpoint, no routing), the package can operate as a self-contained server without Django, Flask, or other web frameworks.

Use it for:

  • Build a standalone JSON-RPC 2.0 API server using only asyncio, with methods exposed via a Python file and the included CLI tool.
  • Integrate JSON-RPC 2.0 protocol handling into an existing asyncio application without adding external dependencies.
  • Create a dispatcher to route incoming RPC method calls to class methods, functions, or lambda expressions in a type-safe way.
  • Handle batch JSON-RPC requests with parallel execution and proper error reporting for each request in the batch.
  • Wrap application methods for use with Tornado, Sanic, or Quart backends using the provided adapter layer.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements the JSON-RPC 2.0 protocol with an asynchronous request manager and minimal asyncio-based server, requiring no external dependencies.

Yes, if you need a lightweight, dependency-free JSON-RPC 2.0 implementation for asyncio-based applications. The permissive MIT license and zero external dependencies make it low-risk to adopt. However, be aware that the project is abandoned—last release was July 2021 with no recent commits. Install only if you do not require active maintenance or compatibility updates beyond Python 3.9.

Install

ajsonrpc on PyPI

pip

pip install ajsonrpc

uv

uv add ajsonrpc

poetry

poetry add ajsonrpc

Installing ajsonrpc

Before you install

Low install friction with no runtime dependencies. Maintenance is stalled—last release was 2021-07-21 and the repository shows no recent activity, though it remains archived=false. Suitable for stable, self-contained use cases where no active updates are expected.

License in practice

MIT license (permissive) allows commercial and private use with minimal restrictions, making it safe to adopt from a licensing standpoint.

Quickstart

pip install ajsonrpc

from ajsonrpc import Dispatcher, Manager

dispatcher = Dispatcher({"sum": lambda a, b: a + b})
manager = Manager(dispatcher)

# For async usage:
await manager.get_response_for_payload('{"jsonrpc": "2.0", "method": "sum", "params": [2, 3], "id": 1}')

Requires Python 3.5 or later; asyncio event loop must be running for async methods.

Verify before relying

  • Whether the package remains compatible with Python versions beyond 3.9 (classifiers list only up to 3.9).
  • Current state of the Tornado, Sanic, and Quart backend integrations mentioned in the description.
  • Whether the included async-json-rpc-server CLI tool is actively maintained or functional.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.5)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,850 days since the last release
Last repo commit
First released
Downloads 2,074,646/month — #3,317 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ajsonrpc-1.2.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

json-rpc 2.0 async serverasyncio rpc protocollightweight json-rpc implementationasync request dispatcherjson-rpc 2.0 asynciorpc server no dependenciesasync method dispatcher
rpc-protocolasynciono-dependencies

More Python Modules packages