Client
Overview
Consuming your pyRPC API.
Client
This section shows how to call your pyRPC server from different client environments.
What You'll Learn
- TypeScript — End-to-end typed contracts with full IDE autocompletion.
- Vanilla Python — Dynamic, codegen-free client for scripts and microservices.
- Advanced — Error handling, testing, and customization.
Quick Example (Python)
from pyrpc_core import RPCClient
with RPCClient("http://localhost:8000") as client:
result = client.add(a=10, b=5)
print(result) # 15If your server exposes more procedures (via @rpc), they appear as dynamic methods on client.