Repository navigation
First stable release of the 0.3 line, developed across five release candidates since June.
It turns PYVIUM from a single-instance wrapper into something that can drive several IviumSoft instances at once, manage their processes, and read measurement data straight off disk while a run is still going. The bundled driver is refreshed to IviumSoft 4.1247.
pip install pyvium
Highlights
Drive several IviumSoft instances safely
Selection is global in the DLL and has no getter, so concurrent calls used to be a hazard. on_instance / instance hold a process-wide driver lock across the selection and the commands that follow it, so calls from different threads never land on the wrong instance. The same applies to Ivium-n-Soft channel tabs through on_channel.
from pyvium import Pyvium
Pyvium.open_driver()
with Pyvium.on_instance(2):
Pyvium.set_cell_on()
print(Pyvium.get_potential())
device = Pyvium.instance(3) # or a handle scoped to one instance
print(device.get_device_status())Manage IviumSoft processes
Launch, adopt, reconcile and close IviumSoft instances, each mapped to the driver instance number it registered with. close() answers the "device is measuring" confirmation dialog itself, so an unattended close no longer times out and kills the process, and by default the measurement carries on running on the device.
from pyvium import Pyvium, IviumsoftInstanceManager
Pyvium.open_driver(verify_iviumsoft=False) # cold start: no IviumSoft running yet
manager = IviumsoftInstanceManager()
record = manager.launch()
manager.close(record.instance_number) # graceful; the run keeps goingRead measurements without the DLL
Read-only, WAL-safe readers for the SQLite files IviumSoft writes, so a run can be tailed while it is still being recorded. No DLL, no hardware, no IviumSoft.
from pyvium import MeasurementReader
with MeasurementReader(path) as reader:
for point in reader.read_points(after_point_id=last_seen):
...Supports incremental tailing, task and cycle scoping, per-task summaries, a curated whole-run preview, and export to CSV or pandas.
Requirements
- Windows, with IviumSoft installed. Minimum release 4.1242; 4.1247 is bundled and is required for a reconnect to adopt a measurement already running on the device.
- Python up to 3.13, cffi 2.x.
- The SQLite readers and the IDF/CSV tools are the exception: they need neither the DLL nor hardware.
Upgrading from 0.2.x
Four behaviour changes worth reading before you upgrade:
get_current_trace,get_current_we2_traceandget_potential_tracereturn the list of samples instead of a raw(result_code, values)tuple. The DLL crash that made these unusable is fixed in 4.1242.get_data_pointandget_data_point_from_scannow raise instead of silently returning the previously read point when a read fails:IndexErrorpast the end,ValueErrorbelow index 1. Both indices are 1-based, which was previously undocumented.- A DLL result code or device status outside the documented set is no longer reported as success. Both affect values nobody has observed in practice.
Full details in CHANGELOG.md.
Full Changelog: v0.2.2...v0.3.0