Welcome to the Evo Python SDK code samples! This directory contains comprehensive Jupyter notebook examples that demonstrate how to use the various Evo APIs for geoscience data management and analysis.
- Evo app: You need a registered app in Bentley to obtain a client ID
- Python: Version 3.10 or higher
- Jupyter Environment: JupyterLab, VS Code, or another Jupyter notebook editor
Register your Evo application in the Bentley Developer Portal to get your client credentials. If a member of your team has already registered an app, contact them and ask for the client credentials. For in-depth instructions, follow this guide on the Seequent Developer Portal.
a. In a new browser tab or window, visit https://developer.bentley.com/ and sign in.
b. Click your profile in the top-right corner and select My Apps. You may need to agree to Bentley developer terms before proceeding.
c. Click the dropdown arrow on the Register New button and choose Register new app for Seequent Evo.
d. Enter an application name and select the Native application type.
e. Enter http://localhost:3000/signin-callback in Redirect URIs.
f. Click Register.
g. The next screen displays the unique Client ID of your application. Save a copy - you will need it to run the Jupyter notebooks.
If you want to focus on the code samples, or if you aren't comfortable using Git, download a copy of this repository as a ZIP file. Visit https://github.com/SeequentEvo/evo-python-sdk and follow the instructions below:
Alternatively, if you are comfortable using Git:
git clone https://github.com/SeequentEvo/evo-python-sdk.gitYou must first install the package manager uv. This will make it easy to set up your Python environment.
Follow the instructions below for Windows, macOS or Linux.
-
Find the local copy of this repository in Windows Explorer. It will be called evo-python-sdk-main if you downloaded as a ZIP file.
-
Right-click on the folder and choose Open in Terminal.
-
Enter the following command to install
uv.powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/$(Get-Content ./UV_VERSION)/install.ps1 | iex"
-
Move to the code-samples directory.
cd code-samples -
Install the Python dependencies.
uv sync
-
Find the local copy of this repository in Finder. It will be called evo-python-sdk-main if you downloaded as a ZIP file.
-
Open the folder so that you can see it's contents.
-
On the Path bar at the bottom of the window, right-click on evo-python-sdk-main.
HINT: If the Path bar isn't visible, select Show Path Bar from the View menu.
-
From the pop-up menu, select Open in Terminal.
-
Enter the following command from the root directory of the repository to install
uv../scripts/install-uv.sh
-
Move to the code-samples directory.
cd code-samples -
Install the Python dependencies.
uv sync
NOTE: This example is based on Ubuntu, but other Linux environments will operate in a similar way.
-
Find the local copy of this repository in Files. It will be called evo-python-sdk-main if you downloaded as a ZIP file.
-
Right-click on the folder and choose Open in Terminal.
-
Enter the following command from the root directory of the repository to install
uv../scripts/install-uv.sh
-
Move to the code-samples directory.
cd code-samples -
Install the Python dependencies
uv sync
Tip
Before running these notebooks, ensure that you have access to at least one Evo workspace. You can do this in two ways:
-
Ask a colleague to add you to an existing workspace.
-
Create a workspace by signing in to the Evo portal, opening the Workspaces tab, clicking the Create workspace button, and then following the instructions.
From the code-samples directory, launch Jupyter.
uv run jupyter notebookTip
If you are using VS Code or another Python IDE, simply open one of the .ipynb files.
Jupyter will list everything in the code-samples directory, and you can click to browse each section.
Before diving into the geoscience code samples, we recommend that you first test your Evo app to make sure your client credentials are set up correctly.
a. Click to open auth-and-evo-discovery. b. Click to open native-app-token.ipynb. c. Enter your client ID and callback URL from when you registered your Evo app.
d. Run the first code cell by pressing Shift+Enter or by pressing the Play button in the toolbar.
e. Run the next code cell. You may see red warning text - this is normal.
f. If everything is set up correctly, your web browser should open a new tab and ask you to sign in with your Bentley ID. Once you have signed in and granted access to the app, return to the tab with Jupyter running.
g. Using the widget that appears under the code cell, select your Organisation, Hub and Workspace.
h. Run the next code cell. You should see a printout of your Evo hub URL, organisation ID and workspace ID.
The values printed in the last cell are required for almost all Evo API calls. This is because all Evo data is stored in a workspace that exists in your assigned Evo hub and organisation.
Now that you know how Evo auth works, explore the other Jupyter notebooks. They all require your client ID and callback URL, just like in this example.
Learn about Evo auth and the Evo Discovery service:
native-app-token.ipynb- Authentication for desktop applicationsservice-app-token.ipynb- Authentication for service applicationsevo-discovery.ipynb- Find your organization ID and hub URL
Block model workflow examples using both SDK and direct API approaches:
sdk-examples.ipynb- High-level Block Model SDK examples (recommended)api-examples.ipynb- Direct API calls for advanced use cases
These notebooks demonstrate:
- Creating regular block models
- Adding and updating columns
- Querying data with bounding boxes
- Working with PyArrow tables and pandas DataFrames
📁 files
Basic unstructured file management operations:
- Upload files to Evo
- Download files from Evo
- List and organize files
- Delete files
- Bonus: Sample Python scripts for file Input-Output in Evo
Publish and download various geoscience data types:
- Drilling campaigns and downhole collections
- Point sets and triangular meshes
- 2D regular grids
- Complex geoscience data structures
Note: Some notebooks have platform-specific requirements (e.g., Windows-only dependencies)
Administrative operations:
- Manage Evo workspaces
- Handle user roles and permissions
- Bonus: Move geoscience objects from one workspace to another
This section includes tasks that are common across many of the Evo APIs.
Advanced file processing:
- Working with Parquet data files
- Data manipulation
- Open the notebook in your preferred editor.
- Update the first cell with your client ID and callback URL.
- Run the authentication cell - this will open your browser for Bentley ID sign-in.
- Select your organisation, instance and workspace using the provided widget.
- Continue with the remaining cells in order.
- Always start with authentication: The auth-and-evo-discovery code samples are the best place to get started.
- Check platform requirements: Some geoscience-objects code samples are Windows-specific.
- Use virtual environments: Keep dependencies isolated for each project.
- Follow notebook order: Run cells sequentially for best results.
- Keep credentials secure: Never commit tokens or credentials to version control.
If you encounter issues:
- Check that you've completed the authentication setup.
- Verify your Python version (3.10+).
- Ensure all requirements are installed.
- Visit the Seequent Community for support.
- Check the GitHub issues for known problems.
Happy coding with Evo! 🎉








