SDKs
Pawpado ships SDKs in three languages, with feature parity across all three. Pick the one for your stack:
| Language | Package | Install |
|---|---|---|
| Node.js | @forjio/pawpado-node |
npm install @forjio/pawpado-node |
| Python | pawpado |
pip install pawpado |
| Go | github.com/hachimi-cat/saas-pawpado/sdk/go |
go get github.com/hachimi-cat/saas-pawpado/sdk/go |
All three:
- Implement the same surface: every API method is exposed as a typed call.
- Handle bearer-token auth automatically — you provide the token (or a
Sessionthat auto-refreshes), they attach the header. - Use only minimal dependencies (Node: zero runtime deps; Python:
httpx; Go: stdlib). - Are open source: code lives in the saas-pawpado repo under
sdk/<lang>/.
When to use which
If your existing stack is in Node, Python, or Go: use the matching SDK. There's no perf or feature reason to use one over another — pick your language.
If your stack is in another language (Ruby, PHP, Rust, etc.): use the raw API. Bearer-token auth is just one header — we have users integrating in all of those languages without an SDK.
The shape
Every SDK exposes the same five groups, mirroring the API:
sessions—start,stop,poll,pair,connect,tailscaleKey.credits—me,topup.billing—storage.settings—get,update.account—session,delete.
Plus admin (operator-only, used internally for orphan reconciliation) and health (no-auth liveness probe).
Quick comparison
Same call in three languages — poll the current session:
Node.js:
import { PawpadoClient } from '@forjio/pawpado-node';
const pawpado = new PawpadoClient({ apiKey: process.env.PAWPADO_TOKEN });
const status = await pawpado.sessions.poll();
if (status.state === 'running' && status.ready) {
console.log('ready to pair');
}
Python:
from pawpado import PawpadoClient
import os
pawpado = PawpadoClient(api_key=os.environ["PAWPADO_TOKEN"])
status = pawpado.sessions.poll()
if status["state"] == "running" and status.get("ready"):
print("ready to pair")
Go:
import (
"context"
pawpado "github.com/hachimi-cat/saas-pawpado/sdk/go"
)
client, _ := pawpado.NewClient(pawpado.ClientOptions{
APIKey: os.Getenv("PAWPADO_TOKEN"),
})
status, _ := client.Sessions.Poll(context.Background())
if status.State == "running" && status.Ready {
fmt.Println("ready to pair")
}
The differences are purely idiomatic: camelCase in Node, snake_case in Python, PascalCase in Go. The underlying API call is identical.
Auth: token vs session
Every SDK accepts two ways to authenticate:
apiKey— a static bearer token. Simplest, but you have to refresh it yourself when it expires (1 hour).session— aSessionobject from@forjio/sdkthat holds both access and refresh tokens, and auto-refreshes proactively before expiry. Recommended for long-running integrations.
The Session is shared with all @forjio/* SDKs — sign in once, use the same session against Pawpado, Plugipay, Storlaunch, etc.
import { Session } from '@forjio/sdk';
import { PawpadoClient } from '@forjio/pawpado-node';
const session = await Session.fromDeviceFlow({ /* ... */ });
const pawpado = new PawpadoClient({ session });
A typical end-to-end flow
import { PawpadoClient } from '@forjio/pawpado-node';
const pawpado = new PawpadoClient({ apiKey: process.env.PAWPADO_TOKEN });
// 1. Check balance
const credits = await pawpado.credits.me();
if (credits.balanceCents < 50_000) {
const topup = await pawpado.credits.topup({ amountCents: 100_000, currency: 'IDR' });
console.log('Top up at:', topup.url);
process.exit(0);
}
// 2. Start
await pawpado.sessions.start();
// 3. Wait for ready
while (true) {
const s = await pawpado.sessions.poll();
console.log(s.state, s.ready);
if (s.state === 'running' && s.ready) break;
if (s.state === 'failed') throw new Error(s.message ?? 'session failed');
await new Promise((r) => setTimeout(r, 5000));
}
// 4. Pair
const { pin, expiresAt } = await pawpado.sessions.pair();
console.log(`Type ${pin} in Moonlight (expires ${expiresAt})`);
Versioning
All SDKs follow semantic versioning:
- MAJOR bumps for breaking changes (rare; we batch them).
- MINOR bumps for new features.
- PATCH bumps for fixes.
Current versions:
- Node:
0.x(active) - Python:
0.x(active) - Go:
0.x(active)
Pre-1.0 means small breaking changes between minor versions are possible. We document every break in the changelog.
Open source
The SDKs live in the same repo as Pawpado itself:
- Node: saas-pawpado/sdk/node
- Python: saas-pawpado/sdk/python
- Go: saas-pawpado/sdk/go
Contributions welcome. Issues at github.com/hachimi-cat/saas-pawpado/issues.
Next
- Installation — install an SDK or CLI.
- Concepts — the data model the SDKs expose.
- API reference — the underlying HTTP API.