The LiquidEarth Python SDK allows developers to interact with LiquidEarth from Python scripts. It supports workflows such as listing accessible Spaces, uploading mesh data, creating a Space during an upload, and requesting a deep link to a Space.
<aside> ⚠️
This feature is intended for advanced users. If you require assistance with complex integrations, please contact our technical support team.
</aside>
Install the SDK from PyPI with pip:
pip install liquid-earth-sdk
Before using the SDK, generate an API key in the API Keys section of the LiquidEarth web portal. Your user account must have a paid license assigned.

The API Keys section of the LiquidEarth web portal, showing an existing key and the controls for generating or revoking keys.
Store the API key in the LIQUID_EARTH_API_TOKEN environment variable. The examples below read it with:
import os
api_token = os.environ["LIQUID_EARTH_API_TOKEN"]
Keep the API key private and revoke it from the web portal when it is no longer needed.
The examples use GemPy to generate a model and convert its meshes to a subsurface.UnstructuredData object. The SDK uploads this unstructured mesh data to LiquidEarth.
pip install gempy pooch
This example shows how to upload a mesh to an already existing LiquidEarth space:
import gempy as gp
from gempy.core.data.enumerators import ExampleModel
from liquid_earth_sdk.api import le_api
import os
def upload_mesh_to_existing_space(space_name):
api_token = os.environ["LIQUID_EARTH_API_TOKEN"]
model = gp.generate_example_model(ExampleModel.ANTICLINE, compute_model=True)
response = le_api.upload_mesh_to_existing_space(
space_name=space_name,
data=model.solutions.raw_arrays.meshes_to_subsurface(),
file_name="new_mesh_file",
token=api_token,
)
print(response)