Official SDKs
shardd ships first-party clients for four ecosystems. Every SDK implements the same edge probe + automatic failover dance, so the typical app calls a couple of high-level methods and skips the /gateway/health and /gateway/edges plumbing.
| Language | Package | Registry | Source |
|---|---|---|---|
| Rust | shardd | crates.io · docs.rs | sdks/rust |
| Python | shardd | pypi.org | sdks/python |
| TypeScript | @shardd/sdk | npmjs.com | sdks/typescript |
| Kotlin / JVM | xyz.shardd:sdk | Maven Central | sdks/kotlin |
| CLI | shardd-cli (binary shardd) | crates.io | apps/developer-cli |
Install
toml
# Cargo.toml
[dependencies]
shardd = "0.1"
tokio = { version = "1", features = ["full"] }bash
pip install sharddbash
npm install @shardd/sdkkotlin
// build.gradle.kts
dependencies {
implementation("xyz.shardd:sdk:0.1.0")
}bash
cargo install shardd-cli
# then:
shardd auth loginWhat every SDK does
- Bootstrap from a list of edge URLs (defaults to the three prod regions:
use1,euc1,ape1). - Probe
/gateway/healthon first use, rank by latency, pin the best healthy candidate. - Refresh the regional directory via
/gateway/edgeson demand. - Fail over on
503/504/ timeout — cool off the bad edge for 60 seconds, retry once against the next-best candidate, reuse the same idempotency nonce so retries collapse onto the same logical write. - Idempotency — every
createEventcarries a nonce. Capture it on your side for safe retries; if you don't pass one, the SDK generates a UUID v4.
See the Quickstart for the common calls in every language, or browse the per-SDK README on GitHub for the full surface (holds, account detail, listEvents, custom edges, etc.).