Skip to main content

Unified platform SDK for Nodus — factory, bridges, and integration layer

Project description

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 — prepared, not yet published.


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.

Project details


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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nodus_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 22.9 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.0.tar.gz
Algorithm Hash digest
SHA256 537f3cf1b1b9d9008c9b48801084f36ac1fd3ccba6964456bbd59d55b6389754
MD5 1f65161cac6ccfab21f60a858b51f135
BLAKE2b-256 e2909ab9bdea7f344bcd6bbfb94b665580828b5a898bae2523f8e89289800071

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nodus_sdk-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d305175a4171bad454cbeaed81af4d540a17ae9808b21c75a3c45965b43cf414
MD5 4f62b4797af08a606b66f6e4ccbfb0d8
BLAKE2b-256 496130027a76477a1ee1fc3b75309649976aac5ce2a34da55c3f6d54ffdb9f08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page