Python API
On Ubuntu 16.04 and Ubuntu 18.04, a Shasta build
includes a shared library shasta-build/shasta-install/shasta.so
which behaves as a Python module. Python code can import shasta
to use the functionality provided by the module.
To create documentation for the Python API, see directions in
shasta/docs/PythonApi/README.
For the Python interpreter to find the module you must either:
- Make sure the Python script that contains
import shastais in the same directory that containsshasta.so(shasta-build/shasta-install/bin). All Python scripts provided with Shasta are copied to that location during the build process. - Or, set environment variable
PYTHONPATHto the name of the directory whereshasta.sois located.