Table of contents

# 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 shasta` is in the same directory that contains `shasta.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 `PYTHONPATH` to the name of the directory where `shasta.so` is located.

Table of contents