Skip to main content

Marimo integration for Hotdata runtime

Project description

hotdata-marimo

Marimo widgets for Hotdata: run SQL, browse catalogs, load managed databases, and display results in notebooks.

Requires Python 3.10+, Marimo, and hotdata-runtime (installed automatically).

Supported widgets

Importing hotdata_marimo registers mo.ui.hotdata_* aliases for discoverability.

Widget Function Notes
SQL editor hm.sql_editor(client) Returns .ui and .result
Table browser hm.table_browser(client) Browse connections, schemas, tables, columns
Managed databases panel hm.databases_panel(client) Create catalogs and load parquet files
Managed database writer hm.managed_database_writer(client) Lower-level create/load UI
Workspace selector hm.workspace_selector_from_env() Pick workspace when HOTDATA_WORKSPACE is unset
Connection picker hm.connection_picker(client) Dropdown of workspace connections
Connection status hm.connection_status(client) API / workspace health callout
Connections panel hm.connections_panel(client) Status callout plus connection list
Query result hm.query_result(result) Render a QueryResult as a table
Recent results hm.recent_results(client) Browse past query results
Run history hm.run_history(client) Recent query runs

Each widget also has a mo.ui.hotdata_* alias (e.g. mo.ui.hotdata_sql_editor). Native Marimo SQL cells are supported via hm.register_hotdata_sql_engine() and mo.sql(..., engine=client).

Install

pip install hotdata-marimo

Set HOTDATA_API_KEY. Optionally set HOTDATA_WORKSPACE, HOTDATA_API_URL, or HOTDATA_SANDBOX.

Connect

import hotdata_marimo as hm

client = hm.from_env()

If HOTDATA_WORKSPACE is unset, pick a workspace interactively:

ws = hm.workspace_selector_from_env()
client = ws.client

SQL editor widget

Run SQL in one cell; show results in the next. Marimo only renders what you return.

Cell 1 — editor

import marimo as mo
import hotdata_marimo as hm

client = hm.from_env()
editor = hm.sql_editor(client, default_sql="SELECT 1 AS ok")
return editor.ui

Cell 2 — result

return hm.query_result(editor.result)

Click Run on Hotdata after changing SQL. The editor caches the last successful result so downstream cells do not re-query on every refresh.

Native Marimo SQL cells

Register the Hotdata engine once, then pass engine=client to mo.sql. Hotdata appears as Hotdata in the SQL connection picker.

Setup cell

import marimo as mo
import hotdata_marimo as hm

hm.register_hotdata_sql_engine()
client = hm.from_env()

SQL cell

_df = mo.sql(
    """
    SELECT 1 AS example_value
    """,
    engine=client,
)

Marimo SQL cell with Hotdata selected in the database connections picker

Browse tables

browser = hm.table_browser(client)
return browser.ui

Pick a connection, schema, and table to inspect columns. Use browser.selected_table in downstream cells.

Managed databases

Create a Hotdata-owned catalog and load a parquet file from the notebook:

panel = hm.databases_panel(client)
return panel

Or use the lower-level writer API:

writer = hm.managed_database_writer(client)
return writer.ui

Other helpers

See Supported widgets for the full list. Quick examples:

return hm.connection_status(client)
return hm.connections_panel(client)
return hm.recent_results(client).ui
return hm.run_history(client)

Demo notebook

uv run marimo edit examples/demo.py --no-token

examples/demo.py combines workspace selection, catalog browsing, managed databases, query history, and a native mo.sql cell.

Development

uv sync --locked
uv run pytest

See hotdata-runtime for the underlying API client.

Project details


Download files

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

Source Distribution

hotdata_marimo-0.1.1.tar.gz (149.5 kB view details)

Uploaded Source

Built Distribution

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

hotdata_marimo-0.1.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file hotdata_marimo-0.1.1.tar.gz.

File metadata

  • Download URL: hotdata_marimo-0.1.1.tar.gz
  • Upload date:
  • Size: 149.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hotdata_marimo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e4ea8e99fae94b9897c04332dd18aace7897ec75d3c12af9af78ab5db684b7ac
MD5 7701b91032b132114a949db1f9ca35cd
BLAKE2b-256 706f3f74aa9dc76c3e5d2ca790658546689489e0cebda5b65d8c3d0e968a4696

See more details on using hashes here.

Provenance

The following attestation bundles were made for hotdata_marimo-0.1.1.tar.gz:

Publisher: publish.yml on hotdata-dev/hotdata-marimo

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

File details

Details for the file hotdata_marimo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hotdata_marimo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hotdata_marimo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05d46f5a5f77299f35447481a1ac516acd4368602abf025d4ef9a15856a8fc61
MD5 e415749b6a3c018659a2d4ab65a71d6e
BLAKE2b-256 550fe383a1eb84d1c0006915546d94a57552942e2a9364cef754b1eedb6674e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hotdata_marimo-0.1.1-py3-none-any.whl:

Publisher: publish.yml on hotdata-dev/hotdata-marimo

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page