Changelog
Release history for the pyrpc framework.
v0.1.0-alpha.1
v0.1.0-alpha.1Initial alpha release of pyrpc — a type-safe RPC framework bridging Python servers and TypeScript clients.
Core Engine
- Python RPC server built on Pydantic v2 with TypeAdapter-based runtime type validation
- JSON-RPC 2.0 protocol with structured error responses (-32600, -32601, -32602, -32603)
- Async and sync procedure support with automatic detection
- Router system with merge support for modular procedure organization
- ASGI transport (PyRPCAsgiApp) for standalone deployment
Server Adapters
- FastAPI adapter: `mount_fastapi(app)` registers RPC routes on an existing FastAPI app
- Flask adapter: `mount_flask(app)` registers RPC routes on an existing Flask app
- Standalone adapter: direct ASGI deployment without a framework
TypeScript Client
- Proxy-based `createClient<Types>()` with full type inference from generated declarations
- Support for positional and named parameter passing matching Python function signatures
- Built-in error handling with `PyRPCError` (code, message, data)
- Automatic request ID generation per call
Code Generation
- `pyrpc` CLI tool for generating TypeScript type declarations from Python server code
- Supports both module-based introspection and URL-based schema fetching
- Maps Python types to TypeScript: `int` → `number`, `str` → `string`, `list[X]` → `X[]`, `Optional[X]` → `X | null`, etc.
- Handles Pydantic model fields, union types, and nested generics
Interactive Demo Sandbox
- Browser-based playground at `/demo` with side-by-side Python/TypeScript editors
- Live TypeScript type generation from `@rpc`/`@model` decorators via Monaco `createModel`
- Mock sandbox execution with return value literal parsing (no Python runtime needed)
- Real-time code validation with Monaco error markers
- Theme-aware terminal with `console.log()` simulation
- Multi-provider templates: Core, FastAPI, and Flask
Documentation Site
- Fumadocs-powered documentation at `/docs` with full search, sidebar navigation, and MDX content
- Getting started guide, architecture deep-dive, protocol specification, and API reference
- Blog at `/blog` with technical deep-dives
- Responsive design with dark/light theme support