Typed Python API for test-and-measurement instruments: power supplies, multimeters, electronic loads, DAQs, and more
Project description
⟢ instro
Python library for talking to test-and-measurement instruments (power supplies, multimeters, electronic loads, DAQs, oscilloscopes, PLCs) from a unified, typed API.
Installation
pip install instro
Requires Python 3.10 to 3.13.
To work on instro itself, clone and install with uv:
git clone https://github.com/nominal-io/instro.git
cd instro
uv sync --extra all
This 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).
Optional extras
Native-SDK drivers ship as separate workspace packages so the heavy dependencies stay optional, and community-contributed drivers ship in their own package. 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[contrib] |
Community-contributed drivers for devices the maintainers can't verify directly |
instro[all] |
Everything above |
Quickstart
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...]}, ...)
That's the whole loop: construct, open(), configure, measure, close(). When you want to capture the data, attach a publisher to stream it to a file, a custom destination, or Nominal. For the full walkthrough (including the background polling daemon and publishers), see the official documentation.
Supported devices
| Category | Class | Vendors |
|---|---|---|
| Power supply | InstroPSU |
B&K Precision (9115, 914X), Keysight (E36100-series), 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 — install them with instro[contrib]. See CONTRIBUTING.md for the bar.
Experimental modules
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, Tektronix 2-series, and Siglent SDS1000X-E. 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. EtherNet/IP uses an optional native backend; install it with instro-unstable[ethernetip].
Documentation
Full guides, API reference, and per-category walkthroughs live at instro.nominal.io.
Contributing
- 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. The repo ships reusable skills and subagents for both Claude Code (.claude/) and Codex CLI (.agents/,.codex/). The existing skills areadd-instrument-driverwhich scaffolds a new vendor driver from a programming manual/API, andvalidate-driver-hardwarewhich smoke-tests an authored driver against the real instrument and self-corrects it. See Repo skills and subagents.
License
Apache License 2.0. Third-party dependency notices and proprietary vendor runtime requirements are documented in NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file instro-0.12.0.tar.gz.
File metadata
- Download URL: instro-0.12.0.tar.gz
- Upload date:
- Size: 625.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb01eb84a5bb0e22852f64938ee524447b97c7cb89214a3e0d081fa110040444
|
|
| MD5 |
cd0c5cd04eca58c755df0e6a4c409ab9
|
|
| BLAKE2b-256 |
32099e6a86832e6d1cad599d25a527186b0e5ac12238c9e5ef3ec5406b41f096
|
Provenance
The following attestation bundles were made for instro-0.12.0.tar.gz:
Publisher:
release-please-publish.yml on nominal-io/instro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
instro-0.12.0.tar.gz -
Subject digest:
eb01eb84a5bb0e22852f64938ee524447b97c7cb89214a3e0d081fa110040444 - Sigstore transparency entry: 1917566688
- Sigstore integration time:
-
Permalink:
nominal-io/instro@6bf950bbe72a6953cb04feb652fef63bc9cd25a3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nominal-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please-publish.yml@6bf950bbe72a6953cb04feb652fef63bc9cd25a3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file instro-0.12.0-py3-none-any.whl.
File metadata
- Download URL: instro-0.12.0-py3-none-any.whl
- Upload date:
- Size: 106.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b5a57f50ae1fc000052c1e6cb51dc0f200f48f16635ac8a380263303885e19e
|
|
| MD5 |
b985c7a108f98986023a7b4d357dc4b8
|
|
| BLAKE2b-256 |
fc762983247bca8c5c997575c2eb9ab660128afdd7606aef17a8e4c20f787753
|
Provenance
The following attestation bundles were made for instro-0.12.0-py3-none-any.whl:
Publisher:
release-please-publish.yml on nominal-io/instro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
instro-0.12.0-py3-none-any.whl -
Subject digest:
5b5a57f50ae1fc000052c1e6cb51dc0f200f48f16635ac8a380263303885e19e - Sigstore transparency entry: 1917566754
- Sigstore integration time:
-
Permalink:
nominal-io/instro@6bf950bbe72a6953cb04feb652fef63bc9cd25a3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nominal-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please-publish.yml@6bf950bbe72a6953cb04feb652fef63bc9cd25a3 -
Trigger Event:
push
-
Statement type: