Luna + Python = lunapi
lunapi is a Python module that provides an interface to Luna. It accesses the C/C++ Luna library directly, meaning all core Luna commands described here have similar syntax and performance; many of the fundamental concepts described here apply here too.
Installation
To obtain lunapi (macOS, Linux or Windows) use pip
:
pip install lunapi
Alternatively, you can pull the lunapi Docker image which also provides a Jupyter lab environment (as well as the command-line Luna and R-based lunaR tools) in a single package.
Getting started
-
Follow the example and lunapi tutorial notebooks from this repository
-
See the primary reference and scope viewer pages
Known issues
-
Jupyter Lab is required for the
scope
viewer -
Using
ctrl-D
orctrl-C
to escape from long-running Luna processes may be slow -
On some platforms, commands may run more slowly under the Jupyter Lab environment compared to a plain Python environment (which gives comparable performance to the command-line Luna). This may be due to suboptimal configuration settings, but it is beyond the scope of this documentation to advise for specific cases. In general, the notebooks are best suited for smaller, interactive jobs rather than more intensive processing.