Python API

[lq_page_hero]

Python API

Take control of your Moku hardware with Python. The Python API is compatible with Python scripting and live environments, making it easy to start interacting with your Moku device right away.

[liquid-button href=”#scrollto-before-you-start” target=”_self” style=”outline blue”]Get started[/liquid-button][/lq_page_hero][lq_centered_image image=”5985″]

[lq_centered_text]

Integrate with Python

There is no limit to what you can do with Python integration for Moku hardware, from real-time interfacing to automated control. Take advantage of the wide array of open-source libraries to further expand your applications.[/lq_centered_text]

[lq_image_text image=”1607″ image_position=”Right”]

Interact in real time

Write and share scripts for repeatable automation, or command your Moku hardware live, to record and analyze your data all in a single place by partnering our Python API with Jupyter.[/lq_image_text][lq_image_text image=”1612″]

Automated control

The Python API takes Moku hardware to the next level, turning it into an automated test, measurement, and control device for your lab. Python integration enables your Moku to automatically:

  • Switch instruments
  • Acquire and process measurements in real-time
  • Save data logs/metadata for post-processing
  • Generate output signals to control your system

[/lq_image_text][text_with_code_block typist_markup=”>> data = oscilloscope.get_data()
>>
>>” code_lines=”import seaborn # Beautiful visualisation^ seaborn.tsplot(data.time, data.ch1)
import pandas # Data science^ pandas.describe(data.ch1)
import scipy # Science, engineering, math^ scipy.optimize.curvefit(f, data.time, data.ch1)” code_position=”Right” data=”oscilloscope.get_data()”]

Open-source integration

Add depth to your Moku applications by integrating with the many open-source Python libraries available on the web.

Create beautiful visualizations with seaborn, or track progress of your experiment remotely by streaming to the web using plotly. Got data? Pandas provides an endless list of high-performance data structures and easy-to-use analysis tools to get the job done.[/text_with_code_block][lq_image_text image=”1613″]

Cross-platform performance

The Python API for Moku can be dropped in to any existing lab infrastructure. It’s fully supported on Windows, Linux, and OSX, and in many cases you can install it without special privileges.

Share your programs with all your colleagues and computers, regardless of operating system — they’ll run anywhere.[/lq_image_text][lq_image_text_top_bottom]

Supported hardware platforms

Python integration is available across all Moku hardware platforms.

[/lq_image_text_top_bottom]

[lq_image_text_top_bottom image=”8403″]Moku:Go[/lq_image_text_top_bottom]
[lq_image_text_top_bottom image=”7773″]Moku:Lab[/lq_image_text_top_bottom]
[lq_image_text_top_bottom image=”7772″]Moku:Pro[/lq_image_text_top_bottom]
[lq_gray_wave_separator]
[get_started_cards_wrapper title=”Before you start”][get_started_description]Moku hardware supports the following versions of Python:

  • Version 3.5+

[liquid-button href=”https://www.python.org/downloads/” target=”_blank” style=”filled blue”]Get Python*[/liquid-button]

*Make sure your version of Python is compatible.[/get_started_description][/get_started_cards_wrapper]

[get_started_cards_wrapper title=”Getting started”][get_started_description]For Moku:Pro, Moku:Lab, and Moku:Go

The API for Python is provided by moku-python, available for download at the Python Package Index or pip install moku.

[liquid-button href=”https://apis.liquidinstruments.com/starting-python.html” target=”_blank” style=”filled blue”]Download[/liquid-button] [liquid-button href=”https://apis.liquidinstruments.com” target=”_blank” style=”filled blue”]Documentation[/liquid-button] [liquid-button href=”https://apis.liquidinstruments.com/starting-python.html” target=”_blank” style=”filled blue”]Get started[/liquid-button]

 

For legacy Moku:Lab version 1.9 only

The Moku:Lab version 1.9 API for Python is provided by pymoku, available for download at the Python Package Index or pip install pymoku.

[liquid-button href=”https://pypi.org/project/pymoku/” target=”_blank” style=”filled blue”]Download[/liquid-button] [liquid-button href=”https://pymoku.readthedocs.io/en/2.8.3/moku.html” target=”_blank” style=”filled blue”]Documentation[/liquid-button] [xyz-ihs snippet=”Python-API-Quick-Start-Guide”][/get_started_description][/get_started_cards_wrapper]