Skip to content

imbraceltd/api-sdk

Repository files navigation

✨ Imbrace SDK Monorepo

Official TypeScript and Python SDKs for the Imbrace platform.

TypeScript Python Docs


Packages

Directory Package Version Runtime
ts/ @imbrace/sdk 1.0.4 Node.js 18+, browser
py/ imbrace 1.0.4 Python 3.9+

Installation

TypeScript / JavaScript

npm install @imbrace/sdk

Python

pip install imbrace

Quick Start

TypeScript

import { ImbraceClient } from "@imbrace/sdk"

const client = new ImbraceClient({
  apiKey: process.env.IMBRACE_API_KEY,
})

const contacts = await client.contacts.list({ limit: 20 })
console.log(contacts.data)

Python

from imbrace import ImbraceClient

with ImbraceClient() as client:
    contacts = client.contacts.list(limit=20)
    print(contacts["data"])

Set IMBRACE_API_KEY in your environment or .env file. Both SDKs read it automatically.


Documentation

Full reference, authentication guides, and examples:

developer.imbrace.co

Available in: English · Tiếng Việt · 简体中文 · 繁體中文


Development Setup

TypeScript SDK

cd ts
npm install
npm run build       # compile to dist/
npm run dev         # watch mode
npm run typecheck   # type check
npm run lint        # lint
npm test            # unit tests (no API key needed)

Python SDK

cd py
pip install -e ".[dev]"   # install with dev tools
pytest tests/unit -v      # unit tests (no API key needed)
ruff check src/ tests/    # lint
mypy src/imbrace          # type check

Docs Site

cd website
npm install
npm run dev     # dev server at localhost:4321
npm run build   # production build

Integration Tests

Integration tests make real API calls and require credentials.

TypeScript

cd ts
IMBRACE_API_KEY=api_xxx npm run test:integration

Python

Create py/.env:

IMBRACE_API_KEY=api_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
IMBRACE_BASE_URL=https://app-gatewayv2.imbrace.co
IMBRACE_ORG_ID=org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Then:

cd py
pytest tests/integration -v -m integration

Repository Structure

api-sdk/
├── ts/                  # TypeScript SDK (@imbrace/sdk)
│   ├── src/             # Source — client, resources, types
│   ├── tests/
│   │   ├── unit/        # Vitest unit tests
│   │   ├── integration/ # Live API tests
│   │   └── local/       # Local package link tests
│   └── dist/            # Compiled output (gitignored)
├── py/                  # Python SDK (imbrace)
│   ├── src/imbrace/     # Source — client, resources, types
│   └── tests/
│       ├── unit/        # pytest unit tests
│       └── integration/ # Live API tests
└── website/             # Docs site (Astro Starlight)
    └── src/content/docs/
        ├── (en root)
        ├── vi/
        ├── zh-cn/
        └── zh-tw/

License

MIT — see LICENSE.