Skip to main content

SQLAlchemy-backed persistence adapters for Nodus runs, events, and jobs

Project description

nodus-store-sql

SQLAlchemy-backed persistence adapters for Nodus runs, events, and jobs.

Provides sync and async stores for the three core durable state surfaces: RunStore (execution lifecycle), EventStore (append-only audit trail), JobStore (background job queue with atomic claiming).

Install

pip install nodus-store-sql           # sync only
pip install "nodus-store-sql[async]"  # + async support

Usage

from nodus_store_sql import SqlStore, SqlStoreConfig, RunRecord
from datetime import datetime, timezone

store = SqlStore(SqlStoreConfig(database_url="postgresql://user:pw@host/db"))
store.create_all()  # creates nodus_runs, nodus_events, nodus_jobs tables

now = datetime.now(timezone.utc)
store.runs.create(RunRecord("run-001", "flow", "pending", None, "trace-abc",
                             None, "user-1", None, 1, now, now))
run = store.runs.get("run-001")

Async

from nodus_store_sql import AsyncSqlStore, SqlStoreConfig

store = AsyncSqlStore(SqlStoreConfig(database_url="postgresql+asyncpg://..."))
await store.create_all()
await store.runs.create(run_record)

Tables

Table Store Purpose
nodus_runs RunStore Execution lifecycle with optimistic locking
nodus_events EventStore Append-only audit trail with causal chains
nodus_jobs JobStore Background job queue with atomic claiming

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_store_sql-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

nodus_store_sql-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nodus_store_sql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ea950c6eb522f9da14bd1b93a79f7ce09c45812606416c55998262f9cb2933d
MD5 8a31c4495a2d14ce8bb98d23e9808e05
BLAKE2b-256 082bbffff01ada6659a16a9c3e5b7f577793e20e4e472987831492736cfbf39c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nodus_store_sql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 193ed28085a0b12c0bd3271eec5e0fcd8c0f1e92c8dac27b07cdaf009641ee6f
MD5 9f9ba450ac255e8d70af413fb87ecb81
BLAKE2b-256 5241a2f90572519a03ce376d756e68462cdaffbc29d31b32128e14ab7e28f5f7

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