# Moku Scripting API

The Moku device family from Liquid Instruments is the next generation of Test. With the Moku Scripting API, command and control of your test has never been easier.

To start, install the API for Python, MATLAB or LabVIEW.

# Get Started

# Python

The Moku Scripting API for Python requires Python 3.5 or newer.

WARNING

Starting with firmware version 600, there are some breaking changes that require you to update your Python client package to version 3.3.1. Read more

Start with Python

# MATLAB

The Moku Scripting API for MATLAB requires MATLAB 2014b or newer.

Start with MATLAB

# Features

# RESTful API

The Moku Scripting API is built around a RESTful HTTP interface, allowing for access from a wide range of programming languages. It makes remote access easy, as the standard HTTP protocol is low bandwidth and commonly allowed to traverse firewalls.

Support for the next generation of Moku products. The Scripting API supports almost all the same features of the Moku iPad and Desktop Applications; if you need something that's missing, visit the Knowledge Base (opens new window) for further information and support.

Python and MATLAB libraries are provided that wrap the RESTful API in a way that feels natural to programmers of all levels.

# Device Discovery

The Python Scripting API comes bundled with the mokucli command line tool for device discovery. Quickly find and connect to the right device without worrying about network configurations. Read more about mokucli.

$ mokucli --help 
Usage: mokucli [OPTIONS] COMMAND [ARGS]...

  MOKU command line utlity

  Version: 2.2.3

  (c) Liquid Instruments 2016-2023

  This CLI is evolving and subjected to change.

  Read more at https://www.liquidinstruments.com/resources/software/

Options:
  --version
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.
  --help                Show this message and exit.

Commands:
  convert   This command converts Liquid Instruments' binary data files...
  download  Download bitstreams for a given firmware version
  files
  license
  list      Search for the mokus on network and display the results
  proxy     Run a proxy from local machine to the Moku
  stream    Stream the LI binary data from Moku onto a local network port
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

# Known Issues

# Firmware Updates

The Scripting API is not currently able to update the firmware on Moku devices. Please use either the Moku Desktop software or iPad App. Updating firmware through the applications may also require that you update your Scripting API libraries.

# File Conversion

The LI File Converter application is available with installation of the Moku Desktop software or as a standalone application. Conversion cannot currently be done through the Scripting API.

# Other Languages

The Moku Scripting API is built around an HTTP/REST interface. This allows easy interfacing from any programming language, however full documentation of this REST interface is still underway. If you have specific needs, again, reach out to our Support Engineers.

# USB and IPv6 Supported Environments

You may wish to use IPv6 on your network, and it must be noted that the USB Connection uses IPv6 internally. IPv6 is not universally supported, and as such the API cannot be used over USB in some environments. A non-exhaustive list is

If you require API connectivity from these environments, you must use a network connection like Ethernet or WiFi, including a point-to-point network with Static IPs if security is a concern.

# Legacy Moku:Lab

If you are using a firmware version <=511, consider upgrading to recieve the most up to date features and fixes.

For Moku:Lab versions <= 511, please refer to our legacy APIs