loop-link
Send geoscience data from Python to the LoopConnect viewer.
Install
pip install loop-link
Optional extras: pyvista, loopstructural, pandas.
Token
The package needs a token. It reads the GEOVIEWER_TOKEN environment
variable. If this variable is not set, it uses the token that the viewer
saved.
Example
import numpy as np
from loop_link import Viewer, Points
viewer = Viewer()
xyz = np.random.rand(100, 3)
viewer.connect()
viewer.send(Points(xyz), id="random-points", name="random points")
viewer.close()
Select and fetch
from loop_link import Viewer, BlockModel
grid = BlockModel((0, 0, 0), (1, 1, 1), (4, 4, 4))
viewer = Viewer()
viewer.send(grid, id="grid")
viewer.select("grid", cells=[12, 13])
sel = viewer.selection()
print(sel.object_id, sel.cells)
watcher = viewer.watch_selection(print, interval=0.5)
watcher.stop()
result = viewer.fetch("grid")
print(result.object)
Select, read and fetch use the tool connection. They work while another program holds the data connection.
A viewer without geoviewer protocol 1.18 gives MissingFeatureError.
A fetch of a drillhole keeps the first interval set. It warns about dropped properties.
Filter and colour
from loop_link import BlockModel, ColourSettings, Viewer
grid = BlockModel((0, 0, 0), (1, 1, 1), (4, 4, 4))
viewer = Viewer()
viewer.send(grid, id="grid", colour=ColourSettings(array="grade", colour_map="viridis", range=(0.0, 1.0), scale="linear"))
result = viewer.filter_range("grid", "grade", 0.5, 1.0)
print(result.passing, result.total)
viewer.filter_values("grid", "unit", [0, 2], exclude=True)
viewer.filter_remove("grid", "grade")
viewer.set_colour_map("grid", "coolwarm")
print(viewer.colour_map_names())
Filter and colour use the tool connection. They work while another program holds the data connection.
The colour map names come from the viewer. A viewer without geoviewer protocol 1.18 gives MissingFeatureError for colour_map_names().
A filter call waits for the end of the build by default. wait=False does not wait, cancel is a threading.Event, and progress gets the fraction.
The counts need a viewer of protocol 1.20. An older viewer gives a FilterResult with no counts.
state is building when the viewer stopped to wait (the build goes on) and unbuilt when the viewer has no counts for the new filters.
A value filter uses the integer ids of the categories. These are the codes of Categorical.
Test against the real codec
Some tests give the frames of loop_link to the real geoviewer codec.
The geoviewer repository is private, so these tests are optional.
Set LOOP_LINK_GEOVIEWER_REPO to a geoviewer checkout and install Rust (cargo).
The tests build a small validator program the first time that they run.
Without the variable, or without cargo, these tests skip.
Metadata
Release files for loop-link 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| loop_link-0.1.0.tar.gz | 140.8 kB | With provenance | Details for loop_link-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| loop_link-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for loop_link-0.1.0-py3-none-any.whl |
Total release size: 219.8 kB
Release files / loop_link-0.1.0.tar.gz
| Download URL | loop_link-0.1.0.tar.gz |
|---|---|
| Size | 140.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bc2cfe0ba2c11663d513f22352dfa2a093a4625a9d6f0b2779c722a2d290234
|
|
BLAKE2b-256 checksum How to use checksums |
a53b1157c4a6aa434db6955abb74cca9f2ec37fcc5dcdf7fddb29b23ce2cf8f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / loop_link-0.1.0-py3-none-any.whl
| Download URL | loop_link-0.1.0-py3-none-any.whl |
|---|---|
| Size | 79.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3eb95c12e724f7dbe1f1b64045e56f1896a8a644601359b313aaa9e3a430f5e7
|
|
BLAKE2b-256 checksum How to use checksums |
7fd546036510d26bb0a029649a7a6ab9df3cfacb5dfb0b397852fea88756f8b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for loop-link 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for loop_link-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.