Skip to main content

evo-widgets

Widgets and presentation layer for the Evo Python SDK — HTML rendering, URL generation, and IPython formatters for Jupyter notebooks.

Overview

This package provides rich HTML representations for Evo SDK objects in Jupyter notebooks. It decouples presentation logic from the data model classes, keeping the core SDK lightweight for production use while providing a batteries-included experience for notebook users.

Installation

The package is included automatically when you install evo-sdk:

pip install evo-sdk

Or install it directly:

pip install evo-widgets

Usage

Enabling Rich Display in Notebooks

Load the IPython extension in your notebook to enable rich HTML rendering for all Evo SDK objects:

%load_ext evo.widgets

After loading the extension, any Evo SDK typed object (e.g., PointSet, Regular3DGrid, TensorGrid) will automatically render with:

  • Formatted metadata tables
  • Clickable links to Portal and Viewer
  • Bounding box information
  • Coordinate reference system
  • Attribute summaries

Example

from evo.notebooks import ServiceManagerWidget
from evo.objects.typed import object_from_path

# Authenticate
manager = await ServiceManagerWidget.with_auth_code(
    client_id="your-client-id"
).login()

# Load the widgets extension
%load_ext evo.widgets

# Load and display an object - it renders with rich HTML formatting
grid = await object_from_path(manager, "/My Grid")
grid  # Displays formatted HTML with Portal/Viewer links

Features

HTML Formatters

Rich HTML representations for all typed geoscience objects:

  • PointSet
  • Regular3DGrid
  • TensorGrid
  • Attributes
  • And all other typed objects inheriting from _BaseObject

URL Generation

Generate Portal and Viewer URLs for objects:

from evo.widgets import (
    get_portal_url_for_object,
    get_viewer_url_for_object,
    get_viewer_url_for_objects,
)

# Get Portal URL for a single object
portal_url = get_portal_url_for_object(grid)

# Get Viewer URL for a single object
viewer_url = get_viewer_url_for_object(grid)

# View multiple objects together in the Viewer
url = get_viewer_url_for_objects(manager, [grid, pointset, tensor_grid])

Low-Level URL Utilities

For advanced use cases, low-level URL generation functions are also available:

from evo.widgets import (
    get_evo_base_url,
    get_hub_code,
    get_portal_url,
    get_viewer_url,
    get_portal_url_from_reference,
    get_viewer_url_from_reference,
    serialize_object_reference,
)

# Generate URLs from components
portal_url = get_portal_url(
    org_id="org-123",
    workspace_id="ws-456",
    object_id="obj-789",
    hub_url="https://350mt.api.seequent.com",
)

# Generate URLs from object reference strings
ref_url = "https://350mt.api.seequent.com/geoscience-object/orgs/org-123/workspaces/ws-456/objects/obj-789"
portal_url = get_portal_url_from_reference(ref_url)
viewer_url = get_viewer_url_from_reference(ref_url)

API Reference

IPython Extension

Function Description
load_ipython_extension(ipython) Register HTML formatters for Evo SDK types
unload_ipython_extension(ipython) Unregister HTML formatters

URL Functions (Object-Based)

Function Description
get_portal_url_for_object(obj) Generate Portal URL from a typed object
get_viewer_url_for_object(obj) Generate Viewer URL from a typed object
get_viewer_url_for_objects(context, objects) Generate Viewer URL for multiple objects

URL Functions (Low-Level)

Function Description
get_evo_base_url(hub_url) Get the Evo base URL from a hub URL
get_hub_code(hub_url) Extract the hub code from a hub URL
get_portal_url(org_id, workspace_id, object_id, hub_url) Generate Portal URL from components
get_viewer_url(org_id, workspace_id, object_ids, hub_url) Generate Viewer URL from components
get_portal_url_from_reference(object_reference) Generate Portal URL from reference string
get_viewer_url_from_reference(object_reference) Generate Viewer URL from reference string
serialize_object_reference(value) Serialize various object types to URL string

Formatters

Function Description
format_base_object(obj) Format a typed geoscience object as HTML
format_attributes_collection(obj) Format an attributes collection as HTML

How It Works

When you run %load_ext evo.widgets, the extension registers HTML formatters with IPython using for_type_by_name. This approach:

  1. Avoids hard dependencies — The widgets package doesn't import model classes directly
  2. Works with all typed objects — Formatters are registered for the base class, so all subclasses are covered
  3. Lazy loading — Formatters only activate when the relevant types are actually used

CSS Customization

The HTML output uses CSS classes prefixed with .evo and respects Jupyter theme variables (e.g., --jp-layout-color1, --jp-ui-font-color1) for proper light/dark mode support.

License

Apache License 2.0 — see LICENSE.md for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evo_widgets-0.2.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evo_widgets-0.2.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file evo_widgets-0.2.1.tar.gz.

File metadata

  • Download URL: evo_widgets-0.2.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for evo_widgets-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e4f748ba91f86c45d2404f40d2d906f730298785833b38d16a53795e1b69524c
MD5 b9656b9fdd4843e832c40057ef9f0d1b
BLAKE2b-256 f2b3ce0dfb2c954056189674d3caa2c32e355b7f46ea10584012ed10791d28fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_widgets-0.2.1.tar.gz:

Publisher: publish-evo-widgets.yaml on SeequentEvo/evo-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evo_widgets-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: evo_widgets-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for evo_widgets-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdda27b4d38f7eb6309dcfbdc1bb2fe8300850fb0e0a3947ea0b5fcdec02cafb
MD5 792a8d383c4cdb0d58bcaffbdf69de6e
BLAKE2b-256 9a5a64bbda2e5104ca93eabdee7fef05b1ebd5a14899152b43e3fbdbfc9a08de

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_widgets-0.2.1-py3-none-any.whl:

Publisher: publish-evo-widgets.yaml on SeequentEvo/evo-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page