Skip to main content
S2 provides official SDKs across several languages to simplify working with our core APIs. While the REST API can be used directly from any HTTP client, the SDKs provide higher-level abstractions (like the Producer API), retry and error handling logic, rich types, and more performant streaming sessions.

Official SDKs

Each repository also contains a variety of examples to demonstrate some common use cases.
The Python and Java SDKs currently use our v1alpha (gRPC) API, which is now deprecated.They will be updated to use the new v1 HTTP API and conform to the patterns described in this documentation.

Getting Started

Every SDK follows the same pattern: create a client with an access token, then navigate to basins and streams hierarchically.
import { S2 } from "@s2-dev/streamstore";

const client = new S2({
	accessToken: process.env.S2_ACCESS_TOKEN!,
});

const basin = client.basin("my-basin");
const stream = basin.stream("my-stream");
From here, operations fall into two categories: account and basin operations for managing resources, and stream operations for reading and writing records. See configuration for details on endpoints, retry behavior, and environment variables.