--- id: ajsonrpc version: "1.2.0" license: MIT license_treatment: permissive maintenance: abandoned --- # ajsonrpc — Async JSON-RPC 2.0 protocol + server powered by asyncio License: permissive · Maintenance: abandoned · Downloads: 2.1M/mo ## 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 above — 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 pip install ajsonrpc uv add ajsonrpc 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_current - Install friction: low - Maintenance: abandoned - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json-rpc 2.0 async server, asyncio rpc protocol, lightweight json-rpc implementation, async request dispatcher, json-rpc 2.0 asyncio, rpc server no dependencies, async method dispatcher, rpc-protocol, asyncio, no-dependencies [View on SkillFed](https://skillfed.io/packages/ajsonrpc) · [View on PyPI](https://pypi.org/project/ajsonrpc/)