pyRPC
DemoBlogChangelogDocs
Get Started

Comparison

How pyRPC compares to other RPC frameworks

pyRPC vs Other Frameworks

pyRPC is a modern, type-safe RPC framework for Python that eliminates the need for OpenAPI schemas, heavy generators, and manual boilerplate.

Key Differences

vs tRPC

  • pyRPC: Python-first, built for asyncio and modern Python type hints
  • tRPC: TypeScript-only, limited to Node.js ecosystem

vs gRPC

  • pyRPC: Zero-config. No .proto files or IDLs. Uses standard Python functions as the source of truth over HTTP/JSON.
  • gRPC: Requires strict IDLs (Protocol Buffers) and binary serialization. More performant for inter-service communication, but carries much higher DX overhead for web-to-server apps.

vs FastAPI

  • pyRPC: Built for procedure-calls. End-to-end type safety via synchronized contracts with no intermediate spec files.
  • FastAPI: Built for REST. Requires manual client code or heavy OpenAPI-based generation.

When to Use pyRPC

✅ You want type-safe RPC without the overhead of OpenAPI.
✅ You're building a modern React/Next.js frontend with a Python backend.
✅ You need a "drop-in" solution for an existing FastAPI or Flask app.
✅ You prefer standard Python type hints over custom DSLs.

# pyRPC: Your function is the API
from pyrpc_core import rpc

@rpc
async def get_user(user_id: int) -> User:
    return await db.get_user(user_id)