Import Data from Python & MATLAB
ScryLab exposes a REST API at http://localhost:5678 that accepts signals from any language or tool. For Python and MATLAB users, there are official clients that handle the details automatically.
Python client
Install with pip and you’re ready to go:
pip install scrylabimport scrylab as scryimport numpy as np
t = np.linspace(0, 1, 1_000)
# Import only – no plottingscry.send(np.sin(2 * np.pi * 5 * t), name="Sine 5Hz", x=t, y_unit="V", x_unit="s")
# Import and plot directlyscry.plot(np.sin(2 * np.pi * 10 * t), name="Sine 10Hz", x=t, y_unit="V", x_unit="s")
# Multiple signals at oncescry.send_many( y=[np.sin(2 * np.pi * 5 * t), np.cos(2 * np.pi * 5 * t)], names=["Sine", "Cosine"], y_unit="V", x_unit="s",)Full documentation and all parameters: github.com/scrylab/scrylab-python
MATLAB client
Install from the MATLAB Add-On Explorer (search “ScryLab Plotter”), then call the functions in the scry namespace:
t = linspace(0, 1, 1000);
% Import only – no plottingscry.send(sin(2*pi*5*t), name="Sine 5Hz", x=t, y_unit="V", x_unit="s")
% Import and plot directlyscry.plot(sin(2*pi*10*t), name="Sine 10Hz", x=t, y_unit="V", x_unit="s")
% Multiple signals at oncescry.send_many({sin(2*pi*5*t), cos(2*pi*5*t)}, names={"Sine", "Cosine"}, y_unit="V", x_unit="s")Full documentation and all parameters: github.com/scrylab/scrylab-matlab
Direct REST API (Julia, curl, …)
If you prefer to use the API directly – from Julia or any other environment – the REST API reference has all endpoints, parameters, and curl examples.
# Quick checkcurl http://localhost:5678/api/status
# Send a signalcurl -X POST http://localhost:5678/api/signals/send \ -H "Content-Type: application/json" \ -d '{"name":"Test","y":[1,2,3],"target_source_id":"<source_id>"}'