Skip to main content

Marimo integration for Hotdata runtime

Project description

hotdata-marimo

Marimo widgets for Hotdata — run SQL, browse your schema, and work with managed databases in reactive notebooks.

Install

pip install hotdata-marimo

Authentication

Set HOTDATA_API_KEY in your environment. Optionally set HOTDATA_WORKSPACE to pin a specific workspace (the first available workspace is used if unset).

Quickstart

Because Marimo reruns cells reactively, construct a widget in one cell and read its .ui or .result in the next.

# Cell 1
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
return hm.query_result(editor.result)

Click Run on Hotdata after editing SQL. The editor caches the last successful result so downstream cells don't re-query on every refresh.

Workspace selection

If you have multiple workspaces or HOTDATA_WORKSPACE is unset, add an interactive picker. ws.client updates when the selection changes:

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

Native Marimo SQL cells

Register the Hotdata engine once and Hotdata will appear as a selectable engine 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()
# Any SQL cell
_df = mo.sql("SELECT * FROM orders LIMIT 10", engine=client)

Marimo SQL cell with Hotdata selected in the database connections picker

Browse your schema

The table browser lets you pick a connection, search for a table, and inspect its columns — with a starter query ready to copy:

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

Use browser.selected_table in downstream cells to reference the chosen table.

Managed databases

View existing managed databases and load new parquet files from a single tabbed panel:

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

Or show just the read-only panel:

return hm.databases_panel(client)

All widgets

Widget Code What you get
SQL editor hm.sql_editor(client) .ui to show the editor, .result to read rows
Query result hm.query_result(result) Renders a QueryResult as a table
Table browser hm.table_browser(client) Browse connections, tables, and column metadata
Managed databases hm.databases_panel(client) Read-only list of managed databases
Database writer hm.managed_database_writer(client) Create databases and load parquet files
Workspace picker hm.workspace_selector_from_env() Dropdown to switch workspaces
Connection picker hm.connection_picker(client) Dropdown of connections in the workspace
Connection status hm.connection_status(client) Health callout for the API and workspace
Connections panel hm.connections_panel(client) Status + list of connections
Recent results hm.recent_results(client) Browse past query results
Run history hm.run_history(client) Recent query runs

All widgets are also available as mo.ui.hotdata_* aliases (e.g. mo.ui.hotdata_sql_editor) for discovery via Marimo's autocomplete.

Demo notebook

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

The demo combines workspace selection, schema browsing, managed databases, query history, and a native SQL cell in a single tabbed interface.

Development

uv sync --locked
uv run pytest

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.3.tar.gz (155.0 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.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hotdata_marimo-0.1.3.tar.gz
  • Upload date:
  • Size: 155.0 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.3.tar.gz
Algorithm Hash digest
SHA256 04a32863c06af820f905e5ea908b9fd28b40cb99b5e72e548a163f908b95f35f
MD5 cad65e329d921774212ba29ec1d3dff7
BLAKE2b-256 60a283a682ec6e429b3eb6e5e3e0cebca5ffc6eeafbff7c4d8abe94c52ae9405

See more details on using hashes here.

Provenance

The following attestation bundles were made for hotdata_marimo-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: hotdata_marimo-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 04921983af9827b90f49a0c975c2287107e221e7159ec12f3496afbbcc5aafe5
MD5 37c70e2662ced374064fe266e510fd1a
BLAKE2b-256 b3756ae0304ff77dfe09a8db2c6b14d267799fa48b3f9d5728a9ebb1ada5cadd

See more details on using hashes here.

Provenance

The following attestation bundles were made for hotdata_marimo-0.1.3-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