API Reference¶
Where to Start¶
New to vgi-rpc? Follow this path:
- Define a service — write a
Protocolclass (Core RPC) - Choose a transport —
serve_pipefor testing,connectfor subprocess,http_connectfor HTTP (Transports, HTTP) - Add streaming — return
Stream[S]for producer or exchange patterns (Streaming)
Everything else is optional and can be added incrementally.
Modules¶
| Module | Description | Required? |
|---|---|---|
| Core RPC | RpcServer, RpcConnection, errors, serve_pipe, connect |
Yes |
| Streaming | Stream, StreamState, ProducerState, ExchangeState |
If using streams |
| Auth & Context | AuthContext, CallContext, ClientLog |
If using auth or logging |
| Transports | PipeTransport, SubprocessTransport, ShmPipeTransport |
Built-in |
| Serialization | ArrowSerializableDataclass, ArrowType, IpcValidation |
If using custom dataclasses |
| HTTP | make_wsgi_app, http_connect, make_sync_client |
pip install vgi-rpc[http] |
| Introspection | introspect, ServiceDescription, rpc_methods |
If using enable_describe |
| External Storage | ExternalLocationConfig, S3Storage, GCSStorage |
pip install vgi-rpc[s3\|gcs] |
| Logging | Level, Message, VgiJsonFormatter |
If using client-directed logs |
| OpenTelemetry | OtelConfig, instrument_server |
pip install vgi-rpc[otel] |
| CLI | vgi-rpc describe and vgi-rpc call commands |
pip install vgi-rpc[cli] |
Import Convention¶
All public symbols are re-exported from the top-level vgi_rpc package:
Optional modules require their corresponding extras to be installed.