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

LanguageRepoDocsAPI
Rusts2/sdkdocs.rsv1
Gos2-sdk-gopkg.go.devv1
TypeScripts2-sdk-typescriptnpmv1
Pythons2-sdk-pythonreadthedocsv1alpha
Javas2-sdk-javajavadocv1alpha
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: basin and stream operations for managing resources, and appending and reading for working with records. See endpoints and retries + timeouts for configuration details.