SDKs

Client libraries for every stack

Official SDK packages with first-class type safety, auto-completion, and zero-config setup.

TypeScript / JavaScript

v2.4.0

npm install @swifton/client
  • Auto-generated types from schema
  • React hooks included
  • Edge runtime compatible
  • Tree-shakeable ESM
View docs
import { SwiftonClient } from '@swifton/client'

const client = new SwiftonClient({
  url: process.env.SWIFTON_URL!,
  apiKey: process.env.SWIFTON_ANON_KEY!,
})

// Fully typed query
const { data } = await client
  .from('users')
  .select('id, email, orders(count)')
  .limit(10)

Python

v1.8.2

pip install swifton-py
  • Async/await support
  • Type hints throughout
  • Django & FastAPI integrations
  • Pandas DataFrame export
View docs
from swifton import Client

client = Client(
    url=os.environ['SWIFTON_URL'],
    key=os.environ['SWIFTON_KEY'],
)

# Fetch with filtering
result = client.table('users') \
    .select('*') \
    .gt('created_at', '2024-01-01') \
    .execute()

Go

v1.2.0

go get github.com/swifton/swifton-go
  • Context-aware calls
  • Connection pooling built-in
  • Generics support (Go 1.21+)
  • Zero-alloc hot path
View docs
client := swifton.New(
    swifton.WithURL(os.Getenv("SWIFTON_URL")),
    swifton.WithKey(os.Getenv("SWIFTON_KEY")),
)

users, err := swifton.Query[User](
    ctx, client,
    "users",
    swifton.Limit(10),
)

Rust

v0.9.1

cargo add swifton
  • Zero-copy deserialization
  • Tokio async runtime
  • Compile-time SQL checking
  • WASM compatible
View docs
let client = SwiftonClient::new(
    &env::var("SWIFTON_URL")?,
    &env::var("SWIFTON_KEY")?,
);

let users: Vec<User> = client
    .from("users")
    .select("*")
    .limit(10)
    .execute::<User>()
    .await?;