Skip to main content

Experiment-facing NI-DAQmx acquisition layer for scientific instrumentation.

Project description

nidaqlib

CI Docs License: MIT

Experiment-facing NI-DAQmx acquisition tools for Python.

nidaqlib is not a replacement for NI's nidaqmx-python. It is a typed, lifecycle-managed acquisition layer built on top of it, designed to fit the same scientific-instrumentation ecosystem as alicatlib and sartoriuslib.

Use nidaqlib when you want:

  • declarative task specifications,
  • consistent async/sync APIs,
  • structured errors,
  • block-oriented acquisition,
  • TDMS / Parquet / SQLite / Postgres / CSV / JSONL logging,
  • hardware-free tests,
  • and unified experiment workflows across DAQ, flow controllers, and balances.

Status

nidaqlib is alpha software. The public API is usable, but may change before the first stable release. See docs/design.md for the architectural design.

Installation

uv add nidaqlib

Optional extras: nidaqlib[parquet], nidaqlib[postgres].

nidaqlib requires the platform NI-DAQmx driver runtime for any real-hardware operation. Tests do not — FakeDaqBackend covers the test surface.

Quickstart

import anyio

from nidaqlib import AnalogInputVoltage, TaskSpec, open_device


spec = TaskSpec(
    name="surface_temperatures",
    channels=[
        AnalogInputVoltage(
            physical_channel="Dev1/ai0",
            name="surface_tc_mv",
            min_val=-0.1,
            max_val=0.1,
        ),
        AnalogInputVoltage(
            physical_channel="Dev1/ai1",
            name="back_tc_mv",
            min_val=-0.1,
            max_val=0.1,
        ),
    ],
)


async def main() -> None:
    async with await open_device(spec) as session:
        reading = await session.poll()
        print(reading.values)


anyio.run(main)

Documentation

Full docs at https://GraysonBellamy.github.io/nidaqlib/.

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

nidaqlib-0.3.0.tar.gz (194.8 kB view details)

Uploaded Source

Built Distribution

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

nidaqlib-0.3.0-py3-none-any.whl (132.8 kB view details)

Uploaded Python 3

File details

Details for the file nidaqlib-0.3.0.tar.gz.

File metadata

  • Download URL: nidaqlib-0.3.0.tar.gz
  • Upload date:
  • Size: 194.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nidaqlib-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a2f7ed1602c61d5f1e865d255eb2103a5c2c8f226862e3e929456052b53f9994
MD5 70dfe18c6fdb14055b37eb47da0aaee2
BLAKE2b-256 c46c4158bfccc51b4bf2be78f16e3aff0c0a2acb36814ce6a81dcce88a557353

See more details on using hashes here.

Provenance

The following attestation bundles were made for nidaqlib-0.3.0.tar.gz:

Publisher: release.yml on GraysonBellamy/nidaqlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nidaqlib-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: nidaqlib-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 132.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nidaqlib-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8b7bc33b6106f782dc1dbab812cc2a74cb4812611da76c08140e10f11950ad
MD5 f6850dae2a9234b7880db8e9c673aa50
BLAKE2b-256 1bca776f77a56509fed424f7a44d5b8f370588d0c693778e99321b0479d9e78b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nidaqlib-0.3.0-py3-none-any.whl:

Publisher: release.yml on GraysonBellamy/nidaqlib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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