Skip to main content

evo-python-sdk

GitHub repository

evo-python-sdk is designed for developers, data scientists, geologists, and geostatisticians who want to work with Seequent Evo APIs and geoscience data.

Getting started with Evo code samples

For detailed information about creating Evo apps, the authentication setup, available code samples, and step-by-step guides for working with the Jupyter notebooks, please refer to the Quick start guide, or code-samples section of the repository.

This comprehensive guide will walk you through everything required to get started with Evo APIs.

Getting started with the Evo SDK

The evo-python-sdk contains a number of sub-packages. You may choose to install the evo-sdk package, which includes all sub-packages and optional dependencies (e.g. Jupyter notebook support), or choose a specific package to install:

PackageVersionDescription
evo-sdkPyPI - VersionA metapackage that installs all available Seequent Evo SDKs, including Jupyter notebook examples.
evo-sdk-commonPyPI - VersionA shared library that provides common functionality for integrating with Seequent's client SDKs.
evo-filesPyPI - VersionA service client for interacting with the Evo File API.
evo-objectsPyPI - VersionTyped Python classes and an API client for geoscience objects — points, grids, variograms, and more.
evo-colormapsPyPI - VersionA service client to create colour mappings and associate them to geoscience data with the Colormap API.
evo-blockmodelsPyPI - VersionTyped block model interactions, reports, and an API client for managing block models in Evo.
evo-widgetsPyPI - VersionWidgets and presentation layer — rich HTML rendering of typed geoscience objects in Jupyter notebooks.
evo-computePyPI - VersionRun compute tasks (e.g. kriging estimation) via the Compute Tasks API.

Quick start for notebooks

Once you have an Evo app registered and the SDK installed, you can load and work with geoscience objects in just a few lines of code:

# Authenticate with Evo
from evo.notebooks import ServiceManagerWidget

manager = await ServiceManagerWidget.with_auth_code(
client_id="<your-client-id>",
cache_location="./notebook-data",
).login()
# Enable rich HTML display for Evo objects in Jupyter
%load_ext evo.widgets

# Load an object by file path or UUID
from evo.objects.typed import object_from_uuid, object_from_path

obj = await object_from_path(manager, "<your-object-path>")

# OR

obj = await object_from_uuid(manager, "<your-object-uuid>")
obj # Displays object info with links to Evo Portal and Viewer
# Get data as a pandas DataFrame
df = await obj.to_dataframe()
df.head()

Typed objects like PointSet, BlockModel, and Variogram provide pretty-printed output in Jupyter with clickable links to view your data in Evo. As support for more geoscience objects is added, geologists and geostatisticians can interact with points, variograms, block models, grids, and more — all through intuitive Python classes.

For a hands-on introduction, see the simplified object interactions notebook. For a complete geostatistical workflow including variogram modelling and kriging estimation, see the running kriging compute notebook.

Getting started with SDK development

Now that you have installed the Evo SDK, you can get started by configuring your API connector, and performing a basic API call to list the organizations that you have access to:

from evo.aio import AioTransport
from evo.oauth import OAuthConnector, AuthorizationCodeAuthorizer
from evo.discovery import DiscoveryAPIClient
from evo.common import APIConnector
import asyncio

transport = AioTransport(user_agent="Your Application Name")
connector = OAuthConnector(transport=transport, client_id="\<YOUR_CLIENT_ID\>")
authorizer = AuthorizationCodeAuthorizer(oauth_connector=connector, redirect_url="http://localhost:3000/signin-callback")

async def main():
await authorizer.login()
await discovery()

async def discovery():
async with APIConnector("https://discover.api.seequent.com", transport, authorizer) as api_connector:
discovery_client = DiscoveryAPIClient(api_connector)
organizations = await discovery_client.list_organizations()
print("Organizations:", organizations)

asyncio.run(main())

For next steps and more information about using Evo APIs directly, see:

What is the reason for your feedback?