Package Exports
- @pyrpc/types
Readme
@pyrpc/types
TypeScript type definitions for pyRPC. Generated by pyrpc codegen — reflects your actual Python backend procedures at compile time.
How it works
@pyrpc/types is a dependency of @pyrpc/client. When you install the client, the postinstall script prompts for your server URL and writes real types:
npm install @pyrpc/clientFor CI or automated setups:
PYRPC_URL=https://api.example.com npm install @pyrpc/clientBefore codegen runs, Types resolves to Record<string, never>. After codegen, it resolves to your actual procedure signatures — full autocompletion, no boilerplate.
Manual generation
If the postinstall prompt is skipped:
pip install pyrpc-codegen
pyrpc codegen https://your-server.comBy default, types are written to node_modules/@pyrpc/types/src/index.ts. Use --output to override.
License
MIT