SextantDocs
v2.4latest
v2.4latestv1.9legacy

Switching keeps you on the same page when it exists in the other version.

On this page

SDKs overview

The official Node, Python and Go clients: what they cover, how they authenticate, and how to write handlers with them.

Updated SDKs Version v2.4

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/node
pipShell
pip install sextant-client
goShell
go get sextant.example/sdk

Create a client

NodeTypeScript
import { Sextant } from '@sextant/node';

const sextant = new Sextant(); // reads SEXTANT_URL and SEXTANT_TOKEN
PythonPython
from sextant import Sextant

client = Sextant()  # reads SEXTANT_URL and SEXTANT_TOKEN
GoGo
client := sextant.NewClient("") // empty token: read SEXTANT_TOKEN

What the SDKs share

  • Authentication from the environment, or explicit token and url options.
  • Idempotent retries. Network errors and 5xx responses 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 the request_id from 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.