Metadata-Version: 2.4
Name: nidaqlib
Version: 0.1.0
Summary: Experiment-facing NI-DAQmx acquisition layer for scientific instrumentation.
Project-URL: Homepage, https://github.com/GraysonBellamy/nidaqlib
Project-URL: Repository, https://github.com/GraysonBellamy/nidaqlib
Project-URL: Documentation, https://GraysonBellamy.github.io/nidaqlib/
Project-URL: Issues, https://github.com/GraysonBellamy/nidaqlib/issues
Project-URL: Changelog, https://github.com/GraysonBellamy/nidaqlib/blob/main/CHANGELOG.md
Author-email: Grayson Bellamy <gbellamy@umd.edu>
License-Expression: MIT
License-File: LICENSE
Keywords: daq,data-acquisition,instrument,laboratory,ni-daqmx
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AnyIO
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: System :: Hardware
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: anyio>=4.13
Requires-Dist: nidaqmx>=1.0
Requires-Dist: numpy>=2
Provides-Extra: docs
Requires-Dist: mkdocstrings-python>=1.12; extra == 'docs'
Requires-Dist: zensical>=0.0.37; extra == 'docs'
Provides-Extra: parquet
Requires-Dist: pyarrow>=16; extra == 'parquet'
Provides-Extra: postgres
Requires-Dist: asyncpg>=0.30; extra == 'postgres'
Description-Content-Type: text/markdown

# nidaqlib

[![CI](https://github.com/GraysonBellamy/nidaqlib/actions/workflows/ci.yml/badge.svg)](https://github.com/GraysonBellamy/nidaqlib/actions/workflows/ci.yml)
[![Docs](https://github.com/GraysonBellamy/nidaqlib/actions/workflows/docs.yml/badge.svg)](https://GraysonBellamy.github.io/nidaqlib/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Experiment-facing NI-DAQmx acquisition tools for Python.

`nidaqlib` is **not** a replacement for NI's [`nidaqmx-python`](https://github.com/ni/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`](https://github.com/GraysonBellamy/alicatlib) and [`sartoriuslib`](https://github.com/GraysonBellamy/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`](docs/design.md) for the
architectural design.

## Installation

```bash
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

```python
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](LICENSE).
