Skip to main content

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,          # True = auto-configure; or pass a store object
    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,
    allowed_paths=None,
    project_root=None,
)

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() → scheduler_add_interval/cron/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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nodus_sdk-0.1.1.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nodus_sdk-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file nodus_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: nodus_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for nodus_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8843e58e57a8a4bb934d59671ab1aa67048924ea3db211ee421fb7e61a4a19cc
MD5 f62c3478cf4aee98702e73f9fb6ca5a9
BLAKE2b-256 99307c5c699cbb4f4de2155e42a127b81e77c034f281547f8d9eeb963721b5e2

See more details on using hashes here.

File details

Details for the file nodus_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nodus_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for nodus_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f73aa41fc4fe8f26c6de422a117b2e30e19ccd138dbf6b074912049bb7cf2c
MD5 982e092bfeca0335ad180935d86d165e
BLAKE2b-256 7249c3dcb8c9cfb473bcaff0fddfec5d1a330607c4bab56c1b0f85347b453541

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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