Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

northstar-sdk

Thin HTTP client for the Northstar platform. Talks only to the Next.js API (NORTHSTAR_API_URL) with a developer account API key.

Install

pip install northstar-sdk
# or
uv add northstar-sdk

Configuration

Variable Description Example
NORTHSTAR_API_URL Next.js API base (includes /api) http://localhost:3000/api
NORTHSTAR_API_KEY Developer account API key northstar_…

Quick start (100 % Client)

from northstar_sdk import Client

client = Client()

# Teams: read + create on the same namespace
team = client.teams.create(name="Sales", description="Revenue ops")
record = client.teams.find_by_name("Sales")

# Users: resolve profile or get a handle for actions
guest = client.users.resolve("guest@example.com")  # .id, .email, .name
guest_handle = client.users.for_ref("guest@example.com")
user = client.users.create(
    first_name="Ada",
    last_name="Lovelace",
    email="ada@example.com",
    password="secure-password",
)

# KPI → chain governance on the returned handle
my_kpi = client.kpis.create(
    name="Monthly revenue",
    dataset_id="…",
    definition_type="MANUAL",
    manual_config={"valueField": "amount", "aggregation": "SUM"},
)
my_kpi.assign_to_team("analytics")

# Ingestion (flat — no client.ingestion.*)
client.storage_systems.create(
    slug="wh-pg",
    name="Warehouse PostgreSQL",
    kind="POSTGRESQL",
    credentials={
        "host": "db.internal",
        "user": "northstar",
        "password": "...",
        "database": "analytics",
    },
)
category = client.data_source_categories.create(
    slug="saas", name="SaaS", color="#3366FF"
)
client.data_sources.create(slug="hubspot", name="HubSpot", category=category)

dataset = client.datasets.create(
    location={"schema": "marts", "table": "nps"},
    name="NPS",
    type="TABLE",
    layer="GOLD",  # no layer = BRONZE: no AI recommendations, not used by default in the chat
)
dataset.analyze()  # full analysis: validations, profiling, quality, alerts

# Dashboard → create then chain governance on the returned handle
dashboard = client.dashboards.create(
    title="Sales metrics",
    icon="layout-dashboard",
    embed_url="https://dashboards.example.com/sales/metrics",
)
dashboard.assign_to_team("Sales")
dashboard.assign_owner("nathan.boulogne@gmail.com")
dashboard.link_datasets(["NPS"])
dashboard.assign_editors(["editor@example.com"])

Public exports

Client, catalogue exceptions (NotFoundError, AmbiguousLookupError), Page, orchestration helpers.

Advanced typing: from northstar_sdk.handles import User, Kpi, Dataset (not exported from top-level northstar).

This package ships py.typed — use Pylance basic or stricter for parameter hints on client.*.create / upsert.

Create / update / upsert payloads (storage systems, datasets, data sources, collections, KPIs, dashboards): see docs/register.md. That page maps SDK calls to the FastAPI Pydantic models and Next.js Zod schemas that actually validate the body. Document collections (create + ingest() / RAG): docs/document-collections.md.

Client namespaces

Property Read Write
client.datasets list, get, find_by_name create, upsert, update, delete, for_id
client.kpis list, get, find_by_name create, upsert, update, delete, for_id
client.figures catalogue create, upsert, update, delete, for_id
client.dashboards browse, get, find_by_title create, upsert, update, delete, for_id, create_folder
client.dashboard_folders browse, list, get, find_by_id, find_by_name create, upsert, update, delete, for_id
client.data_sources list, get create, upsert, update, delete, for_id
client.data_source_categories — create, upsert, update, delete, for_id
client.storage_systems — create, upsert, update, delete, for_id
client.document_collections — create, upsert, update, delete, ingest, for_id
client.teams list, find_by_name, find_by_slug create, upsert, update, delete, for_id
client.users — create, upsert, update, resolve, for_ref, for_id
client.organisations — create, upsert, update, delete, for_id
client.search global search —

Orchestration

from northstar_sdk import Client, northstar_flow

client = Client()

@northstar_flow(client)
def my_flow():
    client.data_sources.create(...)

Metadata

Release files for northstar-sdk 1.4rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for northstar-sdk 1.4rc2
File Size Uploaded
northstar_sdk-1.4rc2.tar.gz 53.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for northstar-sdk 1.4rc2
File Interpreter ABI Platform
northstar_sdk-1.4rc2-py3-none-any.whl Python 3 none any Details

Total release size: 119.8 kB

Release files / northstar_sdk-1.4rc2.tar.gz

Download URL northstar_sdk-1.4rc2.tar.gz
Size 53.4 kB
Tags Source
SHA-256 checksum
How to use checksums
01ed494414ba78b085a9dfe1f632862d556b113c42632ffbded5f08cd18719a1
BLAKE2b-256 checksum
How to use checksums
93a4b14e8183e006e15ec9ba1fe22b69a5b6feda08b4120f0c1a4bd8c005c23b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / northstar_sdk-1.4rc2-py3-none-any.whl

Download URL northstar_sdk-1.4rc2-py3-none-any.whl
Size 66.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2d4a30ae2415c2cd21187ee20342c3e43c9ddc82843dd7a443b83671cde3a5c
BLAKE2b-256 checksum
How to use checksums
e467aad987a62cd1efd27bc6b3034416800970624001257eba39eef9938625c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page