SDKs overview
The official Node, Python and Go clients: what they cover, how they authenticate, and how to write handlers with them.
The SDKs are thin wrappers over the REST API. Every endpoint is a method, named after the resource and the action: jobs.create, schedules.update, queues.pause.
npmShell
npm install @sextant/nodepipShell
pip install sextant-clientgoShell
go get sextant.example/sdkCreate a client
NodeTypeScript
import { Sextant } from '@sextant/node';
const sextant = new Sextant(); // reads SEXTANT_URL and SEXTANT_TOKENPythonPython
from sextant import Sextant
client = Sextant() # reads SEXTANT_URL and SEXTANT_TOKENGoGo
client := sextant.NewClient("") // empty token: read SEXTANT_TOKENWhat the SDKs share
- Authentication from the environment, or explicit
tokenandurloptions. - Idempotent retries. Network errors and
5xxresponses are retried up to twice with jitter. Creates are only retried when you pass an idempotency key. - Typed errors:
NotFoundError,ValidationError,PermissionError,RateLimitError, all carrying therequest_idfrom the response. - Pagination helpers: iterate over
jobs.list(...)and the SDK follows the cursor. - Webhook verification, shown in Webhooks.
Versions
| SDK | Package | Minimum runtime |
|---|---|---|
| Node | @sextant/node |
Node 20 |
| Python | sextant-client |
Python 3.10 |
| Go | sextant.example/sdk |
Go 1.22 |
SDK versions follow the server’s minor version: 2.4.x of an SDK talks to any 2.x server, and uses features of 2.4 when the server has them.
Writing handlers
The SDKs can also run handlers inside your application, so you do not need command handlers or sextant worker. Each SDK page shows its worker API.