Skip to content

API reference

Every page below is auto-generated from the docstrings in src/noxdb/ by mkdocstrings.

Modules

Module Purpose
connection Pool, transaction(), audit logging, SSH tunneling
projects CRUD for projects
subjects CRUD for subjects (keyed on globally-unique subject_code)
visits CRUD for visits (keyed on (subject_id, timepoint))
samples CRUD for samples (sample_name globally UNIQUE)
metadata EAV wrapper for visit_metadata and sample_metadata
files Filesystem-validating registration for sample_files
queries Read-only joins, tidy tables, integrity checks
workflows Atomic multi-table operations on top of the per-table CRUD
fetch Export project metadata + files to a local folder
Project import Master importer: load a whole project folder atomically

Conventions

  • All CRUD functions take a cursor as their first argument — the caller controls the transaction boundary via transaction().
  • Single-row reads return dict[str, Any] | None; collection reads return list[dict[str, Any]].
  • set_* upserts return "inserted" | "updated" | "unchanged".
  • Writes go through _LoggingCursor, which audits to ~/.noxdb/audit.log (override via NOXDB_AUDIT_LOG).