Skip to content

API Reference

Where to Start

New to vgi-rpc? Follow this path:

  1. Define a service — write a Protocol class (Core RPC)
  2. Choose a transportserve_pipe for testing, connect for subprocess, http_connect for HTTP (Transports, HTTP)
  3. 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:

from vgi_rpc import RpcServer, serve_pipe, Stream, AuthContext

Optional modules require their corresponding extras to be installed.