Skip to main content

Backend SDKs

Burdenoff provides backend SDKs for both Node.js and Python environments.

Node.js SDK

Installation

npm install @burdenoff/sdk-node

Features

  • API client
  • Authentication middleware
  • Database utilities
  • Logging helpers
  • Error handling

Usage

import { BurdenoffClient } from '@burdenoff/sdk-node';

const client = new BurdenoffClient({
apiKey: process.env.BURDENOFF_API_KEY,
});

const users = await client.users.list();

Python SDK

Installation

pip install burdenoff-sdk

Features

  • Async API client
  • Authentication helpers
  • SQLAlchemy utilities
  • FastAPI integrations
  • Type hints

Usage

from burdenoff_sdk import BurdenoffClient

client = BurdenoffClient(
api_key=os.getenv("BURDENOFF_API_KEY")
)

users = await client.users.list()

Common Patterns

Authentication

Both SDKs support:

  • API key authentication
  • JWT token authentication
  • OAuth 2.0 flows

Error Handling

Consistent error handling across SDKs:

  • Network errors
  • Authentication errors
  • Validation errors
  • Rate limiting

Retry Logic

Automatic retry with exponential backoff for:

  • Network failures
  • Rate limiting (429)
  • Server errors (5xx)

Development

Node.js SDK

cd workspaces/workspaces-sdk-node
npm install
npm run build
npm test

Python SDK

cd workspaces/workspaces-sdk-python
poetry install
poetry run pytest

Publishing

NPM

npm run build
npm publish --access public

PyPI

poetry build
poetry publish

Package Visibility

All product-specific SDKs follow the alpha/stable visibility model:

  • Alpha versions (e.g., @burdenoff/alpha-workspaces-sdk): Private packages
  • Stable versions (e.g., @burdenoff/workspaces-sdk): Public packages

See NPM Package Management for complete package list and visibility policies.

API Tokens

  • NPM Token: Stored in GitHub Secrets
  • PyPI Token: Stored in GitHub Secrets

See DevSecOps Guide for token management.