pyjls

raw JSON →
0.17.0 verified Fri May 01 auth: no python

Python library for reading and writing Joulescope™ file format (.jls). Version 0.17.0 supports Python 3.11+. Release cadence: approximately monthly.

pip install pyjls
error ModuleNotFoundError: No module named 'pyjls'
cause Package not installed.
fix
Run 'pip install pyjls'.
error AttributeError: module 'pyjls' has no attribute 'Reader'
cause Importing 'pyjls' directly instead of submodule.
fix
Use 'from pyjls import Reader'.
error RuntimeError: Only supports up to 4096 bytes per signal name
cause Signal name exceeds 4096 bytes.
fix
Shorten the signal name.
breaking Dropped Python 3.10 support in v0.16.0; requires ~=3.11.
fix Upgrade Python to 3.11 or later.
deprecated UTC time default changed: Reader now uses 2018-01-01T00:00:00.0000000Z when UTC not found.
fix Ensure your JLS files embed UTC timezone info if you rely on absolute timestamps.
gotcha Signal IDs are not guaranteed to be consecutive integers; use reader.signal_ids instead of assuming range.
fix Iterate over reader.signal_ids to get valid signal IDs.

Minimal example: create a JLS file with one signal, write samples, read back signal info.

from pyjls import Reader, Writer
import os

# Write a simple JLS file
filename = 'example.jls'
writer = Writer(filename)
signal_id = writer.add_signal(
    name='voltage',
    units='V',
    sample_type='f32',
    sample_rate=1000.0
)
writer.append_samples(signal_id, [1.0, 2.0, 3.0], time=[0, 1000, 2000])
writer.close()

# Read it back
reader = Reader(filename)
for sample_id in reader.signal_ids:
    print(f'Signal {sample_id}: {reader.signal_name(sample_id)}')
reader.close()

os.remove(filename)