Skip to main content
The Python SDK is written entirely against the standard library — no C extension, no pybind11, no compiled module. It mirrors the C++ SDK’s public surface and wire behaviour, so a Python client and a C++/Node/Rust server interoperate byte-for-byte.

Requirements

Python ≥ 3.9. No third-party dependencies.
The package installs as rcp-protocol and imports as import rcp.

Server

Client

A gated call to an unadvertised capability raises before any I/O:
Client methods: embed, embed_sparse, embed_multi, rerank, retrieve, search (returns {hits, usage, next_cursor}), graph, transform, index_add, index_delete, catalog, info, ping, call, shutdown.

Selecting a backend

Fusion, streaming & the vector codec

The reference implementations of three spec algorithms ship as importable, tested helpers — identical across all four SDKs, so no adopter re-derives them:
A streaming handler is a generator that yields rcp.Progress and returns the result; over HTTP+SSE the frames stream live, over a plain request the same handler returns one buffered response:
See Federation, Streaming, and compact encoding. Runnable: examples/example_federation.py and examples/example_streaming.py.

Test

The suite includes a case where the Python client drives the C++ example server, proving cross-language interop.