nodus-sdk
Unified platform SDK for Nodus AI systems.
Single-package installation story for the Nodus ecosystem. Auto-wires
available packages via create_runtime(**kwargs), provides 9 bridge modules
for external integrations, and exposes a FastAPI control-plane router.
Status: v0.2.0 — published on PyPI.
create_runtime(auth=True)now requires a configuredSECRET_KEYand raises without one — it used to attach nothing and report success. See CHANGELOG.md.
Install
pip install nodus-sdk # core only
pip install "nodus-sdk[agent,sql,fastapi]" # agent + SQLAlchemy + FastAPI
pip install "nodus-sdk[full]" # everything
Quick start
from nodus_sdk import create_runtime
rt = create_runtime(memory=True, trace_id="req-001", timeout_ms=None)
result = rt.run_source('print("hello from sdk")')
create_runtime()
from nodus_sdk import create_runtime, NodusSDKRuntime
rt = create_runtime(
memory=True, # the runtime's own std:memory store; or pass a MemoryStore
events=True, # True = auto-configure; or pass EventBusConfig
extensions=True, # attach ExtensionRegistry
auth=True, # KeyRing from $SECRET_KEY; or pass your own ring
observability=True, # or pass service name string
trace_id="tid-001", # injected into every emitted event
timeout_ms=None, # None = unlimited (required for long-lived services)
max_steps=None,
# Confinement matches a bare NodusRuntime: the filesystem is jailed to the
# working directory unless allowed_paths is given (None = no jail), and
# subprocess / network / env are denied unless granted:
allowed_paths=["/data"],
allow_network=True,
project_root=None,
)
rt.memory_store is the store the guest's memory_get / memory_put read and
write — the same object create_nodus_router(rt)'s /memory/{key} routes use.
create_runtime returns a NodusSDKRuntime — a NodusRuntime subclass with
fluent attach_* bridge methods. All capability kwargs accept True (default
config) or a config/store object.
auth=True needs a configured SECRET_KEY
auth=True builds a nodus_auth.KeyRing from AuthSettings().SECRET_KEY, so
set that environment variable to a random secret of at least 32 bytes
(nodus_auth.generate_key() makes one). It raises rather than falling back,
because the two obvious fallbacks are both worse than an error:
- a random secret per runtime would stop tokens verifying across a restart, across two runtimes in one process, and across the replicas of any real deployment — while passing every single-process test;
- nodus-auth's dev default
SECRET_KEYis a published constant, so a ring built on it is forgeable by anyone who has read the package.
auth=my_key_ring skips all of that and uses the ring you pass. Requires
nodus-auth>=0.2.0; 0.1.x signs through python-jose, which carries an
unfixed critical advisory (CVE-2026-85394).
rt.auth_key_ring is the ring, and rt.event_bus the bus — both None if the
matching optional package is not installed, in which case the bridge is not
listed in rt.attached_bridges() either.
NodusSDKRuntime fluent API
from nodus_sdk import NodusSDKRuntime
from nodus_sdk.bridges.sql import SqlBridge
from nodus_sdk.bridges.webhook import WebhookBridge
rt = (
NodusSDKRuntime(timeout_ms=None)
.attach_sql(SqlBridge("postgresql://..."))
.attach_webhook(WebhookBridge(secret="my-secret"))
)
All attach_* methods are idempotent and return self.
Bridges
| Bridge | Install extra | Key class |
|---|---|---|
bridges/redis.py |
[redis] |
RedisBridge(url) → queue_backend, event_bus |
bridges/http.py |
[http] |
HttpBridge() → nodus_http.HttpClient |
bridges/llm.py |
[llm] |
LLMBridge(credentials) → FailoverClient |
bridges/observability.py |
[observability] |
init_observability(name, otel=, prometheus=) |
bridges/sql.py |
[sql] |
SqlBridge(url) → sql_query/sql_execute host fns |
bridges/vector.py |
[vector] |
VectorBridge(url, table, dimensions) → vector_search/upsert/delete |
bridges/scheduler.py |
[scheduler] |
SchedulerBridge().register_job(name, fn) → .nd schedules it: scheduler_add_interval(id, secs, name) / scheduler_add_cron(id, expr, name) / cancel |
bridges/webhook.py |
[webhooks] |
WebhookBridge(secret=) → webhook_send |
bridges/api.py |
[fastapi] |
create_nodus_router(rt) + NodusTraceMiddleware |
Bridge return type note: Bridge host functions return Python maps (dicts),
not Records. Use index access in .nd code: r["status"], not r.status.
FastAPI integration
from fastapi import FastAPI
from nodus_sdk import create_runtime
from nodus_sdk.bridges.api import create_nodus_router, NodusTraceMiddleware
rt = create_runtime(timeout_ms=None)
app = FastAPI()
app.add_middleware(NodusTraceMiddleware, runtime=rt)
app.include_router(create_nodus_router(rt))
# Routes: POST /run, GET /health, GET /syscalls, GET|POST|DELETE /memory/{key}
detect_available()
from nodus_sdk import detect_available
avail = detect_available()
# {"memory": True, "extension": False, "events": True, ...}
Development
pip install -e ".[dev]"
PYTHONPATH="C:/dev/Coding Language/src" pytest tests/ -q
Tests require nodus-lang source on PYTHONPATH.
License
MIT — see LICENSE.
Metadata
Release files for nodus-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nodus_sdk-0.2.0.tar.gz | 37.3 kB | Without provenance | Details for nodus_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nodus_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for nodus_sdk-0.2.0-py3-none-any.whl |
Total release size: 62.2 kB
Release files / nodus_sdk-0.2.0.tar.gz
| Download URL | nodus_sdk-0.2.0.tar.gz |
|---|---|
| Size | 37.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb7700031f8b5677ff7185be8c5a37b2d042b032d4b3df58a62eb9bf56e44f8d
|
|
BLAKE2b-256 checksum How to use checksums |
8a64d1c6988fba11c9f00c75f1cff6b167af94a1a99fea63467713c93f90b41f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / nodus_sdk-0.2.0-py3-none-any.whl
| Download URL | nodus_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42d6ed0109933c5a46475f4cd8da77b8f87b4f6a3a11a31562919517709d152e
|
|
BLAKE2b-256 checksum How to use checksums |
3c661ec217119d37e9eadba79f6c341f37fc551033f7dc986e60d914ac28a459
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for nodus-sdk 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.