# Moku
A Python library for the command, control and monitoring of the [Liquid Instruments Moku:Go](http://www.liquidinstruments.com).
API documentation can be found at [ReadTheDocs](http://moku.readthedocs.org).
# Getting Started
### 1. Requirements
- [Python](https://www.python.org) installed. We support Python >= **3.5**.
- Zeroconf to browse for Moku's on network
- Your Moku connected to the same network as your computer.
- Internet access.
### 1. Install Moku
Open a command-line terminal and type
pip install --upgrade moku
If you wish to build and train models for the Moku Neural Network instrument, install optional machine learning dependencies with
pip install moku[neuralnetwork]
The IP address of your Moku:Go device can be found with
moku list
### 3. Start scripting
You are now ready to control your Moku:Go using Python! You can find a few example scripts in the **examples/** folder.
Here is a basic example of how to connect to a Moku:Go, deploy the Oscilloscope and fetch a single hi-res data trace. Open python and run the following code
```python
from moku.instruments import Oscilloscope
# Connect to your Moku by its ip Oscilloscope('192.168.###.###')
# or by its serial m = Oscilloscope(serial=123)
i = Oscilloscope('192.168.###.###', force_connect=False)
try:
# Span from -1s to 1s i.e. trigger point centred
i.set_timebase(-1, 1)
# Get and print a single frame worth of data (time series
# of voltage per channel)
data = i.get_data()
print(data['ch1'], data['ch2'], data['time'])
except Exception as e:
print(f'Exception occurred: {e}')
finally:
i.relinquish_ownership()
```
# Troubleshooting
#### moku: command not found
Ensure moku has been successfully installed in your Python distrubution by open a python shell and running
import moku
No error indicates a successful install.
You may need to add python binaries to your PATH. This varies with operating system and python version but as an example
export PATH=$PATH:/home/user/.local/bin
#### ImportError: No Module named moku
Make sure you are running the version of Python you installed moku to. Often a system will have multiple Python installations. Try substituting `pip` with `python -m pip` in the installation.
If you installed moku inside an Environment (i.e. via virtualenv or conda-env), ensure that Environment is activated. You can check that moku is installed in your currently running environment using
(myenv)$ pip list
## Issue Tracking
Please report issues at https://www.liquidinstruments.com/support/contact/
Raw data
{
"_id": null,
"home_page": "https://liquidinstruments.com",
"name": "moku",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.5",
"maintainer_email": null,
"keywords": "moku, mokugo, mokupro, liquid instruments, test, measurement, lab, equipment",
"author": "Liquid Instruments",
"author_email": "info@liquidinstruments.com",
"download_url": "https://files.pythonhosted.org/packages/4f/83/fe3af40d1491cc48ea0565fa96b87230cc39922de2ba3d62fd905adad6ac/moku-3.3.2.tar.gz",
"platform": null,
"description": "# Moku\nA Python library for the command, control and monitoring of the [Liquid Instruments Moku:Go](http://www.liquidinstruments.com).\nAPI documentation can be found at [ReadTheDocs](http://moku.readthedocs.org).\n\n# Getting Started\n\n### 1. Requirements\n- [Python](https://www.python.org) installed. We support Python >= **3.5**.\n- Zeroconf to browse for Moku's on network\n- Your Moku connected to the same network as your computer.\n- Internet access.\n\n### 1. Install Moku\nOpen a command-line terminal and type\n\n pip install --upgrade moku\n\nIf you wish to build and train models for the Moku Neural Network instrument, install optional machine learning dependencies with\n\n pip install moku[neuralnetwork]\n\nThe IP address of your Moku:Go device can be found with\n\n moku list\n\n### 3. Start scripting\nYou are now ready to control your Moku:Go using Python! You can find a few example scripts in the **examples/** folder.\nHere is a basic example of how to connect to a Moku:Go, deploy the Oscilloscope and fetch a single hi-res data trace. Open python and run the following code\n\n```python\nfrom moku.instruments import Oscilloscope\n\n# Connect to your Moku by its ip Oscilloscope('192.168.###.###')\n# or by its serial m = Oscilloscope(serial=123)\ni = Oscilloscope('192.168.###.###', force_connect=False)\n\ntry:\n # Span from -1s to 1s i.e. trigger point centred\n i.set_timebase(-1, 1)\n\n # Get and print a single frame worth of data (time series\n # of voltage per channel)\n data = i.get_data()\n print(data['ch1'], data['ch2'], data['time'])\nexcept Exception as e:\n print(f'Exception occurred: {e}')\nfinally:\n i.relinquish_ownership()\n```\n\n# Troubleshooting\n\n#### moku: command not found\nEnsure moku has been successfully installed in your Python distrubution by open a python shell and running\n\n import moku\n\nNo error indicates a successful install.\n\nYou may need to add python binaries to your PATH. This varies with operating system and python version but as an example\n\n export PATH=$PATH:/home/user/.local/bin\n\n#### ImportError: No Module named moku\nMake sure you are running the version of Python you installed moku to. Often a system will have multiple Python installations. Try substituting `pip` with `python -m pip` in the installation.\nIf you installed moku inside an Environment (i.e. via virtualenv or conda-env), ensure that Environment is activated. You can check that moku is installed in your currently running environment using\n\n (myenv)$ pip list\n\n## Issue Tracking\n\nPlease report issues at https://www.liquidinstruments.com/support/contact/\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python scripting interface to the Liquid Instruments Moku hardware",
"version": "3.3.2",
"project_urls": {
"Documentation": "https://apis.liquidinstruments.com",
"Homepage": "https://liquidinstruments.com"
},
"split_keywords": [
"moku",
" mokugo",
" mokupro",
" liquid instruments",
" test",
" measurement",
" lab",
" equipment"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f1067345e8d74774ce202eeeadba773a2bbc9017277d29b130ddb85d4944b41f",
"md5": "86f8e830581f894f6385c1a85256c6ab",
"sha256": "52e7d821bcb2a5cc7bd232b1977b4d070a981e81808ebe2322b0a8c9581b3fb9"
},
"downloads": -1,
"filename": "moku-3.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "86f8e830581f894f6385c1a85256c6ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.5",
"size": 80956,
"upload_time": "2024-12-19T23:51:13",
"upload_time_iso_8601": "2024-12-19T23:51:13.487085Z",
"url": "https://files.pythonhosted.org/packages/f1/06/7345e8d74774ce202eeeadba773a2bbc9017277d29b130ddb85d4944b41f/moku-3.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4f83fe3af40d1491cc48ea0565fa96b87230cc39922de2ba3d62fd905adad6ac",
"md5": "50a668ab8ed7ef1e150d0fdc33341fee",
"sha256": "1ce49e2f9245a0ed3e9b51dcc23dd36ce7374fe8768bb490a7879129ac5a8de3"
},
"downloads": -1,
"filename": "moku-3.3.2.tar.gz",
"has_sig": false,
"md5_digest": "50a668ab8ed7ef1e150d0fdc33341fee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.5",
"size": 54247,
"upload_time": "2024-12-19T23:51:16",
"upload_time_iso_8601": "2024-12-19T23:51:16.908755Z",
"url": "https://files.pythonhosted.org/packages/4f/83/fe3af40d1491cc48ea0565fa96b87230cc39922de2ba3d62fd905adad6ac/moku-3.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 23:51:16",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "moku"
}