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.1.0 — published on PyPI.
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, # attach KeyRing
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.
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() → NodusHttpClient |
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.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nodus_sdk-0.1.3.tar.gz | 27.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nodus_sdk-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.1 kB
Release files / nodus_sdk-0.1.3.tar.gz
| Download URL | nodus_sdk-0.1.3.tar.gz |
|---|---|
| Size | 27.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54f93b7a01191985f5506936e9e00f5f2da54dd43d9d831472cf78002d62f7db
|
|
BLAKE2b-256 checksum How to use checksums |
ef20e5f8bd4e0586d6a9c1e74b19eab72b9432279e4c976a22e5ca0ec679c1ac
|
| 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.1.3-py3-none-any.whl
| Download URL | nodus_sdk-0.1.3-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00c7d0d7ed0ecf213fce826db1607ae1b25eaa3f706c598b350e75b09343e32b
|
|
BLAKE2b-256 checksum How to use checksums |
97467867a663fc167eee0d29cacdf15e05a85e56704e59536b7d5b68acc64834
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|