Python SDK
The official Nimobase SDK for Python (3.10+) is the alternative to the TypeScript SDK when your integration runs on a server. It uses a secret key (sk_) and has functional parity with @nimobase/sdk/node.
Installation
The nimobase package installs from PyPI:
pip install nimobaseFirst client
You need a secret key (sk_…) created by an OWNER or ADMIN; see API Keys.
import os
from nimobase import Nimobase
client = Nimobase(secret_key=os.environ["NIMOBASE_SECRET_KEY"])The SDK adds the contract prefix (/v1/…) for you; if you need to pin the version, use version.
Environment and version
The client starts in Production. To try things without touching real data, pass sandbox=True:
client = Nimobase(secret_key=secret_key) # Production
tests = Nimobase(secret_key=secret_key, sandbox=True) # SandboxThe contract version is chosen with version; leave it out and you get the latest published one:
pinned = Nimobase(secret_key=secret_key, version="v1")What changes and what doesn't between environments: Environments. Environments are explained in Environments.
Example
from nimobase import NimobaseError, collect_all_pages
page = client.companies.list({"page": 1, "limit": 20})
print(page["data"], page["total"])
# Every page, no dropped rows (ceiling of 100 per request)
all_companies = collect_all_pages(
lambda page, limit: client.companies.list({"page": page, "limit": limit}),
)
try:
client.companies.get("missing-id")
except NimobaseError as err:
print(err.status_code, err.message, err.code)List endpoints return the API envelope (data, total, page, limit) and HTTP 4xx/5xx errors become NimobaseError. Branch on err.code, not on the message.
Authentication uses the X-API-Key header with the secret key.
Modules
The client exposes the same modules as the TypeScript server SDK: users, companies, settings, notifications, billing, invitations, among others. Methods and types for each one live in Features and methods.