FAQ

Frequently asked questions about pyRPC.

What is pyRPC?

pyRPC is a type-safe RPC framework for Python backends with TypeScript frontends. Define procedures with @rpc, get TypeScript types automatically, no OpenAPI, no codegen pipelines.

How is this different from tRPC?

tRPC is TypeScript-only. pyRPC brings the same end-to-end typing to Python + TypeScript stacks.

How is this different from OpenAPI?

OpenAPI is a specification file that must be manually kept in sync with your implementation. pyRPC treats your Python functions as the source of truth, types are derived directly from your code, not from a separate spec.

Does pyRPC support async procedures?

Yes. The interpreter detects whether your function is async def or def and dispatches accordingly. The TypeScript client uses schema introspection to determine whether to await a call.

Which frameworks are supported?

FastAPI, Flask, and Django. See Adapters for details.

Can I use pyRPC without a framework?

Yes. The standalone ASGI adapter (PyRPCAsgiApp) can be deployed directly without FastAPI, Flask, or Django.

Do I need to install anything besides pyrpc-core?

Install pyrpc-core for the runtime, CLI, and codegen. Add framework adapters via extras: pyrpc-core[fastapi], pyrpc-core[flask], pyrpc-core[django].

How do I generate TypeScript types?

Run pyrpc dev. On first run it asks for your backend framework and entry point plus your client setup, creates a pyrpc.json config, and generates __pyrpc.ts in your client project automatically. For CI, use pyrpc codegen.

How do TypeScript types reach my client?

pyrpc dev writes __pyrpc.ts to your client project root and wires @pyrpc/types to it: a tsconfig paths alias plus a bundler alias for Vite, SvelteKit, and Next.js Turbopack. The types regenerate automatically whenever you save a .py file.

Is pyRPC production-ready?

pyRPC is in active development. APIs may change. Follow the changelog and roadmap for direction.