Zurich Instruments Toolkit
raw JSON → 1.4.0 verified Fri May 01 auth: no python
High-level API for Zurich Instruments devices, built on top of zhinst-core. Current version: 1.4.0. Released on a monthly cadence.
pip install zhinst-toolkit Common errors
error ModuleNotFoundError: No module named 'zhinst.toolkit' ↓
cause zhinst-toolkit not installed or installed in wrong environment.
fix
Run
pip install zhinst-toolkit in the correct Python environment. error AttributeError: module 'zhinst.toolkit' has no attribute 'Session' ↓
cause Importing the module instead of the class; old version of toolkit.
fix
Use
from zhinst.toolkit import Session and ensure version >=1.0.0. Warnings
breaking In version 1.0.0, the API was restructured: Session is now the entry point, replacing the old `zhinst.toolkit.connection` approach. ↓
fix Use `from zhinst.toolkit import Session` instead of `from zhinst.toolkit.connection import Connection`.
deprecated The `session.connect_device(serial)` method is deprecated in favor of `session.connect_device(device_id)` in v1.4.0. ↓
fix Use `session.connect_device('dev1234')` with the full device ID.
Imports
- Session wrong
import zhinst.toolkit.Sessioncorrectfrom zhinst.toolkit import Session - DeviceTypes
from zhinst.toolkit import DeviceTypes
Quickstart
from zhinst.toolkit import Session
session = Session('localhost')
session.connect_device('dev1234')
print(session.devices)