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.2.tar.gz (23.0 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.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nodus_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 23.0 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.2.tar.gz
Algorithm Hash digest
SHA256 71b6045fb30be1454d0ff27434a60abda521755db278bba92f3ee879b0c32009
MD5 d69710e4ab6ddb32937a1f80bf8bc109
BLAKE2b-256 bb7b72e9c0a03659183f2019735c77132125d177dd1533fe64bf4e538b8e2550

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nodus_sdk-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d955db66a1373e34eee128e4b8c37dab87708c40cf89efc94c73e8211d1f525a
MD5 b091db9288345f3848f4a14bc150c06e
BLAKE2b-256 46a7145b0962ea5b192bcc66bbb77fe63f0a3df55fbbe9db7c81dbe925e0f159

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

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