Two versions of the Python API client are available, depending on the firmware version running on your EMScope instrument.
Legacy API — Software ≤ 3.13
The api.py and api_example.py files are provided for use with EMScope software versions 3.13 and earlier.
Required libraries: websockets, json. The matplotlib library is used in the example script.
Current API — Software ≥ 4.0
A fully redesigned API client is available for EMScope software version 4.0 and later. It introduces a cleaner interface, automatic RBW and display range management, robust session handling, and transparent keepalive ping/pong support.
The api_v4.py and api_example_v4.py files are provided.
Required libraries: websockets, matplotlib. Python 3.8 or later is required.
For a detailed description of the underlying WebSocket protocol, refer to the WebSocket API documentation.
