Skip to main content

dtollib

Experiment-facing DT-Open Layers acquisition layer for Python.

dtollib is a typed, lifecycle-managed acquisition layer over a hand-rolled ctypes binding to the Data Translation DataAcq SDK (oldaapi64.dll + olmem64.dll). It fits the same scientific-instrumentation ecosystem as alicatlib, sartoriuslib, watlowlib, and nidaqlib.

Hardware in scope: DT9805 (multi-sensor USB module — AI only) and DT9806 (adds D/A, DIO, counter/timer).

Platform support: Windows only (the DataAcq SDK is Windows-only). The package installs on Linux/macOS for type-checking and ecosystem composition, but the real backend raises DtolDependencyError at first SDK touch.

Status

The Phase 0–5 software surface has landed and is exercised end-to-end against FakeDtolBackend. Bound and working:

  • Discovery + diagnostics — find_devices, dtol-discover, dtol-diag.
  • Single-value analog input — TaskSpec, AnalogInputVoltage, ThermocoupleInput, open_device, session.poll.
  • Continuous acquisition — record, record_polled, the driver-thread callback bridge, DaqBlock, and the CSV / JSONL / RawCounts sinks plus the .dt-raw replay tool.
  • Single-value output + safety gates — session.write, dtol-read, dtol-info, analog/digital output channel specs.
  • Counters, trigger/retrigger config, and DtolManager.start_synchronized.

Hardware acceptance on the maintainer bench is ongoing and some original roadmap targets have been revised to match DT9805/DT9806 capability findings — see docs/plan-hardware-functional.md. For the phased roadmap and architecture see docs/design.md and docs/implementation-plan.md.

Install

pip install dtollib
# or
uv pip install dtollib

Optional extras:

pip install "dtollib[parquet]"    # pyarrow for the Parquet sink
pip install "dtollib[postgres]"   # asyncpg for the Postgres sink

Quickstart

A single-value thermocouple read (see also docs/quickstart-async.md):

import anyio
from dtollib import TaskSpec, ThermocoupleInput, ThermocoupleType, open_device


async def main() -> None:
    spec = TaskSpec(
        name="surface_temperatures",
        channels=[
            ThermocoupleInput(
                physical_channel=0,
                name="surface_tc_K",
                thermocouple_type=ThermocoupleType.K,
                min_val_degc=-50.0,
                max_val_degc=200.0,
            ),
        ],
    )
    async with await open_device(spec) as session:
        reading = await session.poll()
        print(reading.values)


anyio.run(main)

On Linux/macOS (no SDK) this type-checks and runs against FakeDtolBackend; on Windows with the DataAcq SDK and a DT9805/DT9806 attached it reads real hardware.

Development

uv sync --all-extras --group dev
uv run pytest
uv run ruff check
uv run ruff format --check
uv run mypy
uv run pyright

See CONTRIBUTING.md for the binding verification gate, hardware test markers, and CI lanes.

License

MIT — see LICENSE.

Metadata

Release files for dtollib 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dtollib 0.1.0
File Size Uploaded Provenance Actions
dtollib-0.1.0.tar.gz 467.7 kB With provenance Details for dtollib-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dtollib 0.1.0
File Interpreter ABI Platform Actions
dtollib-0.1.0-py3-none-any.whl Python 3 none any Details for dtollib-0.1.0-py3-none-any.whl

Total release size: 731.6 kB

Release files / dtollib-0.1.0.tar.gz

Download URL dtollib-0.1.0.tar.gz
Size 467.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7ab74e0f869d0aaf231cd17f2e6d930e2e72691fef5eb0e7e28077156e5c083b
BLAKE2b-256 checksum
How to use checksums
8903020943c581127335903ec932a69a750ce894b29c5020dc2f39d5fbe774b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Release files / dtollib-0.1.0-py3-none-any.whl

Download URL dtollib-0.1.0-py3-none-any.whl
Size 263.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3b31ba077fc71374e37b224bd79dc7125305e45471ea728b56db1d0d06a9d23
BLAKE2b-256 checksum
How to use checksums
5f2d5d1e64bbb4bc52c60307c6d1184cfa55fd00bf035a57276e0d7e3a068da4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Security for dtollib 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dtollib-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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