SDKs & Tools
Official SDKs for TypeScript, Python, and Go, plus Terraform provider
SDKs & Tools
PlatformXe provides official SDKs for three languages plus a Terraform provider for infrastructure-as-code.
TypeScript SDK
npm install @caldera/platformxe-sdk
import { PlatformXeClient } from '@caldera/platformxe-sdk';
const px = new PlatformXeClient({
apiKey: 'pxk_live_your_key_here',
// retries: 2, // default
// timeoutMs: 10000, // default
// failOpen: true, // default — returns error envelope instead of throwing
});
// Send email
const result = await px.sendEmail({
to: ['user@example.com'],
subject: 'Welcome',
html: '<h1>Hello!</h1>',
});
// Check permission
const check = await px.permissions.check({
adminId: 'usr_123',
path: 'chat/session',
action: 'READ',
});
// Resolve identity (NG / KE / GH / ZA — engine dispatches per country)
const profile = await px.identity.resolve({
type: 'BVN',
value: '22012345678',
resolveLinked: true,
consent: { granted: true, reference: 'ref_123' },
});
103 methods across all services. Includes retry with exponential backoff, configurable timeout, and circuit breaker (failOpen mode).
Python SDK
pip install platformxe
from platformxe import PlatformXeClient
client = PlatformXeClient(
api_key="pxk_live_your_key_here",
# timeout=10.0, # default
# retries=2, # default
# fail_open=True, # default
)
# Send email
client.messaging.send_email(
to="user@example.com",
subject="Welcome",
html="<h1>Hello!</h1>",
)
# Check permission
result = client.permissions.check(
admin_id="usr_123",
path="chat/session",
action="READ",
)
# Resolve identity
profile = client.identity.resolve(
type="BVN",
value="22012345678",
consent_reference="ref_123",
)
103 methods mirroring the TypeScript SDK. Uses httpx for HTTP with retry and circuit breaker.
Go SDK
go get github.com/calderax/platformxe-go
package main
import (
"fmt"
px "github.com/calderax/platformxe-go"
)
func main() {
client := px.NewClient(px.ClientConfig{
APIKey: "pxk_live_your_key_here",
// Timeout: 10, // seconds, default
// Retries: 2, // default
// FailOpen: true, // default
})
// Check permission
result, err := client.Permissions.Check("usr_123", "chat/session", "READ")
if err != nil {
panic(err)
}
fmt.Println(result)
}
103 methods with zero external dependencies (stdlib net/http only).
Terraform Provider
terraform {
required_providers {
platformxe = {
source = "calderax/platformxe"
}
}
}
provider "platformxe" {
api_key = var.platformxe_api_key
}
See the Terraform Provider Guide for full documentation.
SDK Comparison
| Feature | TypeScript | Python | Go |
|---|---|---|---|
| Methods | 103 | 103 | 103 |
| Retry | Exponential backoff | Exponential backoff | Exponential backoff |
| Timeout | Configurable (10s default) | Configurable (10s default) | Configurable (10s default) |
| Circuit Breaker | failOpen mode | fail_open mode | FailOpen mode |
| Dependencies | None (fetch) | httpx | None (stdlib) |
| Package | @caldera/platformxe-sdk | platformxe | platformxe-go |