Metadata-Version: 2.5
Name: instro
Version: 1.21.0
Summary: Typed Python API for test-and-measurement instruments: power supplies, multimeters, electronic loads, DAQs, and more
Project-URL: Homepage, https://github.com/nominal-io/instro
Project-URL: Documentation, https://instro.nominal.io
Project-URL: Repository, https://github.com/nominal-io/instro
Project-URL: Issues, https://github.com/nominal-io/instro/issues
Project-URL: Changelog, https://github.com/nominal-io/instro/blob/main/CHANGELOG.md
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: awg,daq,data-acquisition,dmm,electronic-load,ethernet-ip,hardware-in-the-loop,instrument-control,lab-automation,modbus,multimeter,oscilloscope,plc,power-supply,pyvisa,scpi,test-and-measurement,visa,waveform-generator
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.10
Requires-Dist: fastavro[snappy]>=1.12.1
Requires-Dist: nominal<2.0.0,>=1.166.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pymodbus<3.13,>=3.10
Requires-Dist: pyserial>=3.5
Requires-Dist: pyvisa-py[gpib-ctypes,hislip-discovery,psutil,usb-full,vicp]<0.9,>=0.8.1
Requires-Dist: pyvisa>=1.15
Requires-Dist: textual>=0.80
Requires-Dist: thermocouples>=2.1.2
Requires-Dist: typer>=0.12
Provides-Extra: aardvark
Requires-Dist: instro-i2c-aardvark; extra == 'aardvark'
Provides-Extra: all
Requires-Dist: instro-contrib; extra == 'all'
Requires-Dist: instro-daq-labjack; extra == 'all'
Requires-Dist: instro-daq-mcc; extra == 'all'
Requires-Dist: instro-daq-ni; extra == 'all'
Requires-Dist: instro-ethernetip; extra == 'all'
Requires-Dist: instro-i2c-aardvark; extra == 'all'
Requires-Dist: instro-unstable; extra == 'all'
Provides-Extra: contrib
Requires-Dist: instro-contrib; extra == 'contrib'
Provides-Extra: daq
Requires-Dist: instro-daq-labjack; extra == 'daq'
Requires-Dist: instro-daq-mcc; extra == 'daq'
Requires-Dist: instro-daq-ni; extra == 'daq'
Provides-Extra: ethernetip
Requires-Dist: instro-ethernetip; extra == 'ethernetip'
Provides-Extra: i2c
Requires-Dist: instro-i2c-aardvark; extra == 'i2c'
Provides-Extra: labjack
Requires-Dist: instro-daq-labjack; extra == 'labjack'
Provides-Extra: mccdaq
Requires-Dist: instro-daq-mcc; extra == 'mccdaq'
Provides-Extra: nidaq
Requires-Dist: instro-daq-ni; extra == 'nidaq'
Provides-Extra: unstable
Requires-Dist: instro-unstable; extra == 'unstable'
Description-Content-Type: text/markdown

<div align="center">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nominal-io/instro/main/res/logo/instro-logo-ascii-white.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/nominal-io/instro/main/res/logo/instro-logo-ascii-black.svg">
  <img width="512" alt="Nominal Instro SDK Logo" src="https://raw.githubusercontent.com/nominal-io/instro/main/res/logo/instro-logo-ascii-black.svg">
</picture>
</div>

<br>

An open-source, vendor-agnostic Python library for interfacing with test equipment.

[![PyPI](https://img.shields.io/pypi/v/instro.svg?color=419B55)](https://pypi.org/project/instro/)
[![Downloads](https://img.shields.io/pepy/dt/instro?color=419B55&label=downloads)](https://pypi.org/project/instro/)
[![Docs](https://img.shields.io/badge/docs-instro.nominal.io-419B55)](https://instro.nominal.io)
[![SDK](https://img.shields.io/badge/sdk-nominal--io.github.io-419B55)](https://nominal-io.github.io/instro/)
[![Community](https://img.shields.io/badge/community-community.instro.nominal.io-419B55)](https://community.instro.nominal.io)
[![Discord](https://img.shields.io/badge/discord-join-419B55?logo=discord&logoColor=white)](https://discord.gg/nN4RzhQkr)

## Quickstart

```python
from instro.daq.drivers.labjack import LabJackTSeriesDriver
# from instro.daq.drivers.ni import NIDAQDriver
from instro.daq import InstroDAQ
from instro.daq.types import Direction
from instro.lib.publishers import FilePublisher

pub = FilePublisher(format="jsonl", directory="/tmp/instro/")

daq = InstroDAQ(
  name       = "myDAQ",
  driver     = LabJackTSeriesDriver(device_id="1234"),
  publishers = [pub],
  #driver    = NIDAQDriver(device_id="Dev1") # swap drivers, same code
  )
daq.open()
daq.configure_analog_channel(
    direction=Direction.INPUT, physical_channel="AIN0", alias="ch_0", range_min=0, range_max=5
)
measurement = daq.read_analog()  # written to `publishers`
print(pub.file_path.read_text())
```

## [Installation](https://instro.nominal.io/instrumentation/installation)

### Basic
<table>
<tr>
<td>

```bash
uv add instro
```

</td>
<td>

```bash
pip install instro
```

</td>
</tr>
</table>

### With Additional Packages
<table>
<tr>
<td>

```bash
uv add "instro[all]"
```

</td>
<td>

```bash
pip install "instro[all]"
```

</td>
</tr>
</table>

Available packages:

| Instrument Type | Package | Contents |
| --- | --- | --- |
| **All** | `all` | All drivers in this table|
| **DAQ** | `daq` | All DAQ drivers |
|  | `nidaq` | NI DAQ package |
|  | `mccdaq` | Measurement Computing (MCC) package |
|  | `labjack` | LabJack package |
| **I2C** | `i2c` | All I2C packages |
|  | `aardvark` | TotalPhase Aardvark package |
| **EtherNet** | `ethernetip` | EtherNet/IP support |
| **Other** | `contrib` | Community-contributed drivers |
|  | `unstable` | Experimental unstable modules |

See [Installation](https://instro.nominal.io/instrumentation/installation) for more info.

## [Supported devices](https://instro.nominal.io/instrumentation/supported-instruments)

<!-- --8<-- [start:supported-devices] -->
| Category | Class | Vendors |
|---|---|---|
| Power Supply | `InstroPSU` | B&K Precision (9115, 914X), EA Elektro-Automatik (PSB 10000-series), Keysight (E36100-series), Rigol (DP800-series), Siglent (SPD3303), TDK Lambda (Genesys), simulated |
| Multimeter | `InstroDMM` | Agilent 34401A, Keysight 34461A, Keithley 2400, Keithley 2750 (unstable), simulated |
| Arbitrary Waveform Generator | `InstroAWG` | Keysight (33521B), Rigol (DG1022Z) |
| Electronic Load | `InstroELoad` | B&K Precision (85xxB-series), EA Elektro-Automatik (PSB 10000-series) |
| Oscilloscope | `InstroScope` | Keysight (1200X-series), Tektronix (2-series), Siglent (SDS1000X-E) |
| Flow Controller | `InstroFlowController` | Alicat MC-series |
| DAQ | `InstroDAQ` | Keysight 34980A, NI-DAQmx, LabJack T-series, MCC USB-series, DewesoftX (unstable) |
| I2C | `I2CInterface` | Total Phase Aardvark |
| Modbus | `ModbusDevice` | Any Modbus TCP / RTU device |
| Motor Controller | `InstroMotorController` | VESC 6 over CAN via python-can (unstable) |
| EtherNet/IP | `EtherNetIPDevice` | Allen-Bradley / CompactLogix-class PLCs |
<!-- --8<-- [end:supported-devices] -->

See [Supported devices](https://instro.nominal.io/instrumentation/supported-instruments) for more info.

## [Contributing](https://github.com/nominal-io/instro/blob/main/CONTRIBUTING.md)

To work on `instro` itself, clone and install with [uv](https://docs.astral.sh/uv/):

```bash
git clone https://github.com/nominal-io/instro.git
cd instro
uv sync
```
See [Contributing](https://github.com/nominal-io/instro/blob/main/CONTRIBUTING.md) for more info.

## License

[Apache License 2.0](https://github.com/nominal-io/instro/blob/main/LICENSE). Third-party dependency notices and proprietary vendor runtime requirements are documented in [NOTICE](https://github.com/nominal-io/instro/blob/main/NOTICE).
