Skip to main content

Installation

Two things are needed to use the SDK: a client library in your preferred language, and a server to talk to.

The client library​

pip install ikalogic-scanastudio

Python 3.10 or newer. The package is fully typed and ships py.typed, so mypy and your editor see the whole API.

from ikalogic_scanastudio import ScanaStudio, Trigger

The client is synchronous: no async in the public API, and no event loop to set up.

The server​

Every client needs a server to connect to. There are two ways to have one.

Run ScanaStudio. The application starts its own server and your script can connect to it. This is the easiest way to start, and you can watch what your script does in the window.

Run the server on its own. The server binary is installed alongside the application and runs headless, with no window or display, which suits a lab machine or a CI runner:

PlatformWhere the installer puts it
Windows%LOCALAPPDATA%\Programs\ScanaStudio\scanastudio-server.exe
Linux<prefix>/bin/scanastudio-server — /usr/bin from the .deb or .rpm
macOS/Applications/ScanaStudio.app/Contents/MacOS/scanastudio-server
scanastudio-server

It listens on ws://127.0.0.1:4911. Move it with --listen or the SCANASTUDIO_LISTEN environment variable:

scanastudio-server --listen 127.0.0.1:5000 # another port, still local only
scanastudio-server --listen 192.168.1.20:4911 # one network interface only
scanastudio-server --listen 0.0.0.0:4911 # every interface
No authentication

The protocol has no authentication. A server listening beyond loopback gives anyone who can reach the port full control of your instruments, and lets them write files on that machine. Read Remote and shared instruments before you open it up.

Linux: device permissions​

On Linux, a device is visible but not openable until the udev rules are installed. The .deb, the .rpm and the tarball's install.sh all place 60-ikalogic.rules in /etc/udev/rules.d for you.

If a device appears in devices() but refuses to open, the rules are usually missing (install.sh --no-udev, or an install without root). Re-run the installer, or copy the rules file by hand and reload:

sudo udevadm control --reload-rules && sudo udevadm trigger

Checking it works​

You do not need hardware. Every server offers demo devices:

from ikalogic_scanastudio import ScanaStudio

with ScanaStudio.connect() as server:
print(server.info)
for device in server.devices():
print(" ", device)

You should see the server's version and at least one demo device. se254 is the one used throughout this documentation.

Version mismatch on connect

If connect fails with a protocol version mismatch, the SDK and the server are out of step. Update whichever is older.

Next: your first capture.