Python library for talking to test-and-measurement instruments (power supplies, multimeters, electronic loads, DAQs, oscilloscopes, PLCs) from a unified, typed API.
pip install instroRequires Python 3.10+.
To work on instro itself, clone and install with uv:
git clone https://github.com/nominal-io/instro.git
cd instro
uv sync --extra allThis creates a virtual environment with the core library, all optional vendor drivers, and dev dependencies. Run with uv run python your_script.py or activate via source .venv/bin/activate (Unix) / .venv\Scripts\activate (Windows).
Native-SDK drivers ship as separate workspace packages so the heavy dependencies stay optional. Install only what you need:
| Extra | Pulls in |
|---|---|
instro[nidaq] |
NI-DAQmx (Linux + Windows) |
instro[labjack] |
LabJack LJM |
instro[mccdaq] |
MCC UL (Windows-only) |
instro[daq] |
All three DAQ vendor SDKs |
instro[aardvark] |
Total Phase Aardvark (I2C); alias: instro[i2c] |
instro[all] |
Everything above |
Talk to a simulated PSU. No hardware required.
# Terminal 1: start the in-process SCPI sim server:
uv run python -m instro.psu.scpi_sim_server# Terminal 2: run this:
from instro.psu import InstroPSU
from instro.psu.drivers import SimulatedPSU
with InstroPSU(
name="my-psu",
driver=SimulatedPSU("TCPIP0::127.0.0.1::5025::SOCKET"),
num_channels=2,
) as psu:
psu.output_enable(True, channel=1)
psu.set_voltage(3.3, channel=1)
print(psu.get_voltage(channel=1)) # Measurement(channel_data={'my-psu.ch1.voltage': [3.31...]}, ...)For the full walkthrough (including publishing to Nominal Core and the background polling daemon), see the official documentation.
| Category | Class | Vendors |
|---|---|---|
| Power supply | InstroPSU |
B&K Precision (9115, 9140), Rigol (DP800-series), Siglent (SPD3303), TDK Lambda (Genesys), simulated |
| Multimeter | InstroDMM |
Agilent 34401A, Keithley 2400 |
| Electronic load | InstroELoad |
B&K Precision (85xxB-series) |
| DAQ | InstroDAQ |
Keysight 34980A, NI-DAQmx, LabJack T-series, MCC USB-series |
| I2C | I2CInterface |
Total Phase Aardvark |
| Modbus | ModbusDevice |
Any Modbus TCP / RTU device |
Don't see your vendor? Drivers the maintainers can't verify directly against the device land in instro-contrib on contributor verification. See CONTRIBUTING.md for the bar.
In-development categories whose APIs may break between releases live in the separate instro-unstable workspace package:
InstroScope: oscilloscope category, with drivers for Keysight 1200x and Tektronix 2-series. Import viainstro.unstable.scope.EtherNetIPDevice: EtherNet/IP / CIP support for CompactLogix-class PLCs. Import viainstro.unstable.ethernetip.
Opt in by depending on instro-unstable explicitly.
Full guides, API reference, and per-category walkthroughs live at instro.nominal.io.
- Humans: see
CONTRIBUTING.mdfor development setup, PR conventions, and where different kinds of contributions belong in the workspace. - AI coding tools (Claude Code, Cursor, Codex, Copilot Workspace, …): see
AGENTS.mdfor codebase landmarks, conventions, and common workflows.
Apache License 2.0. Third-party dependency notices and proprietary vendor runtime requirements are documented in NOTICE.