The type-safe bridge between Python and TypeScript.
Define your API once in Python. Consume it in TypeScript with end-to-end type safety. No schema drift. No hand-written clients.
uv add pyrpc-corefrom pyrpc_core import rpc, model
@model
class Post:
id: int
title: str
published: bool = False
@rpc
def get_post(id: int) -> Post:
return Post(id=id, title="Hello pyRPC")
Supported Frameworks
Features.
01
Automatic typesafety.
Server-side changes surface as client errors before you even save the file.
02Works with your stack.
Adapters for every framework and runtime you already use.
03Autocompletion.
Your API behaves like a typed SDK, generated straight from your Python code.
04Batteries included.
Validation, middleware, error handling, and links out of the box.
05Server Actions.
Call procedures directly from React Server Components and Actions.
06Typed errors.
Exceptions arrive in catch blocks as typed PyRPCError values.
Ship in three commands.
From zero to a type-safe API in under two minutes.
uv add pyrpc-core installs the core runtime with Pydantic-powered validation and async support.from pyrpc_core import rpc, model
@model
class User:
name: str
@rpc
def greet(name: str) -> User:
return User(name=name)Connect MCP clients to pyRPC:
Claude
Cursor
VS Code
Windsurf
Cline
Zed
Codex
Grok
Antigravity
OpenCode
Claude
Cursor
VS Code
Windsurf
Cline
Zed
Codex
Grok
Antigravity
OpenCode
What builders say.
“if there an option for compatibility with oRPC RPC/OpenAPI client v2, you will get support from me.”
Định LêCreator, oRPC“Dude, love this. As someone who uses FastAPI a lot, I'm gonna try this.”
Sanku@sankalpa_02“We deleted our whole hand-written API layer. After running pyrpc dev, every procedure shows up fully typed in VS Code autocomplete, with no more stale wrappers or outdated docs to keep in sync.”
Amer AbdulquemFull-Stack Developer“Nice seems like a cool project.”
FrectonzDeveloper, evpin.com“Renaming a Python procedure flagged every call site in our frontend before we even ran the build. This is what API development should feel like.”
Brook TeklebrhanMobile Developer“Bro this is so fkn cool 🔥”
SeefunBackend Developer“Ayyy this is veryy dope fr! Smooth and well functional amazing work brother! 👏 you gotta push it well fr”
Cyber GuardiansFull-Stack Developer“Good work 👏”
ኢዮብ z ሽቱ@kilopal_Built something with pyRPC?
Ship end-to-end types.
Define procedures in Python. Consume them in TypeScript with full type safety. No schema drift, no codegen pipelines.
-- / month
-- downloads
-- stars

pyRPC