Skip to main content
S2 provides official SDKs in multiple languages to help you integrate durable streams into your applications. Each SDK offers idiomatic interfaces for interacting with the S2 API.

Available SDKs

Rust SDK

Full-featured Rust SDK with async support and type safety

TypeScript SDK

TypeScript/JavaScript SDK with modern async patterns

Go SDK

Idiomatic Go SDK with goroutines and channels

Python SDK

Python SDK (migration to v1 API in progress)

SDK Compatibility

All SDKs interact with the S2 REST API and support:
  • Account and basin management
  • Stream creation and configuration
  • Appending records with batching
  • Reading records with streaming
  • Access token management
  • Metrics retrieval

Choosing an SDK

Production Ready

These SDKs are fully compatible with the v1 API and recommended for production use:

Migration Required

These SDKs need to be updated to support the v1 API:
  • Python SDK - Migration in progress
  • Java SDK - Migration in progress

Common Patterns

All SDKs follow similar patterns for common operations:

Initialization

Create an SDK client with your access token:
use s2_sdk::{S2, types::S2Config};

let s2 = S2::new(S2Config::new("your_access_token"))?;

Writing Records

Append records to streams:
use s2_sdk::types::AppendRecord;

let producer = stream.producer(ProducerConfig::new());
let ticket = producer.submit(AppendRecord::new("data")?).await?;
let ack = ticket.await?;

Reading Records

Read records from streams:
use s2_sdk::types::ReadInput;

let mut batches = stream.read_session(ReadInput::new()).await?;
while let Some(batch) = batches.next().await {
    let batch = batch?;
    // Process batch
}

Getting Help

  • Documentation: Each SDK has detailed documentation with examples
  • GitHub Issues: Report bugs or request features in the respective SDK repository
  • Discord: Join our Discord community
  • Email: Reach out at [email protected]

Next Steps

Rust SDK Guide

Get started with the Rust SDK

REST API Reference

Explore the underlying REST API

Concepts

Learn about S2 core concepts

Examples

Browse code examples

Build docs developers (and LLMs) love