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 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_task


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 open_task(spec) as task:
        reading = await task.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.1.0.tar.gz (168.5 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.1.0-py3-none-any.whl (115.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nidaqlib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0a895c64794874ffd4983a59eda58b2348952747b2279aff2743790f8633997
MD5 d6f9d1e3d70d65d263e710928db20ecb
BLAKE2b-256 c2fbe4918ba69839927b246dbc444907eb3b1c6a7fe8b1eccb45883e1c5723af

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nidaqlib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 115.4 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90edd9a9b35e14f8dec5b22538788d837e0d4f53399fd816c61459cb333dd27b
MD5 7d1fabb483d1b34187c496dde7fc2ee8
BLAKE2b-256 e3565cd968850d3afe180bcf55c9e54cd900b843767a27a8bf61be8d6930e400

See more details on using hashes here.

Provenance

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