sartoriuslib¶
Python library for Sartorius balances over serial. Supports both wire protocols the hardware speaks: xBPI (binary, length-prefixed, checksum-protected, SBN-addressed) and SBI (ASCII command/response and autoprint).
This site is the reference for the v1 design. The authoritative
architectural document lives at Design; every design decision in
the library should be traceable to a section there. The library is built as a
sibling to alicatlib — same
async-first device facade, sync wrapper, manager, fake transport, acquisition
helpers, sinks, typed models, and explicit safety gates.
Where to start¶
- Installation
- Async quickstart
- Sync quickstart
- Balances —
Balance, families (CUBIS / OEM weigh cell / basic lab), capability flags - Commands — the command surface, safety tiers, protocol-variant dispatch
- Streaming — xBPI cadenced poll and the three SBI stream modes
- Logging and acquisition — recorder, sinks, structured log events
- Safety — destructive operations and
confirm=True - Testing —
FakeTransport, fixtures, hardware tiers - Wire protocol — xBPI/SBI framing, opcode tables, capture analysis
Status¶
Alpha. The library ships the full transport (real + fake), both protocol
clients (xBPI and SBI), the Balance facade, multi-device SartoriusManager,
recorder and record(...) helper, all first-party sinks (CSV, JSONL, SQLite
in the base install; Parquet, Postgres behind extras), the sync facade,
fixture-based testing utilities, and the stable sarto-* CLI plus the
sarto-diag reverse-engineering namespace. The public architecture is
frozen; documentation completion and broader hardware coverage are in
progress. See Design for forward work.