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.2.0.tar.gz (184.1 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.2.0-py3-none-any.whl (126.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nidaqlib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5fa0ba1526c5da1aef4fcb54145c8d425ad127d01e168d4466804c3424bee377
MD5 9fa3fcaea8f0ca156577986d3a2fa45f
BLAKE2b-256 9e4a8ecaaa152fda3119707d68420089da6612d04f00727671723370efed73a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nidaqlib-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: nidaqlib-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 126.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa5aaeb7900c68f60f992084defef6eb70005ef8caa7c492c7ecbe4c02723bf
MD5 1b04934ba7ee60b8a5e3c8dec445f2fe
BLAKE2b-256 31f9c7776701fcb3a0a7150f820dea0983f5ad525aae21159bb6b9ddb374785a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nidaqlib-0.2.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