Jupyter integration for Hotdata runtime
Project description
hotdata-jupyter
Jupyter helpers for Hotdata — rich query display, workspace selection, managed databases, and a %%hotdata cell magic for running SQL directly in cells.
Install
pip install hotdata-jupyter
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
import hotdata_jupyter as hj
client = hj.from_env()
result = client.execute_sql("SELECT 1 AS ok")
hj.display_query_result(result)
Workspace selection
When HOTDATA_WORKSPACE is set, the client connects to that workspace directly. If you have multiple workspaces, use the interactive picker — it renders a dropdown and updates ws.client when the selection changes:
ws = hj.workspace_selector_from_env()
display(ws.ui)
client = ws.client
Running SQL
result = client.execute_sql("SELECT * FROM orders LIMIT 10")
hj.display_query_result(result)
display_query_result renders the row count, column names, and a pandas DataFrame inline in the notebook.
Cell magic
Load the extension once per session, then use %%hotdata cells to write SQL without wrapping it in Python strings. The last active client is picked up automatically:
%load_ext hotdata_jupyter
%%hotdata
SELECT
product,
SUM(amount) AS total
FROM orders
GROUP BY product
ORDER BY total DESC
Managed databases
List the managed databases in your workspace:
hj.display_managed_databases_panel(client)
Create a database and load parquet files programmatically:
db = hj.create_managed_database(client, name="sales", tables=["orders"])
with open("orders.parquet", "rb") as f:
loaded = hj.load_managed_table_from_bytes(client, "sales", "orders", f.read())
print(f"Loaded {loaded.row_count} rows into {loaded.full_name}")
Or use the interactive ipywidgets form:
writer = hj.managed_database_writer(client)
writer.display()
Open the demo notebook
jupyter lab examples/demo.ipynb
The demo covers workspace selection, connection listing, schema browsing, query history, and cell magics.
Development
uv sync --locked
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hotdata_jupyter-0.2.2.tar.gz.
File metadata
- Download URL: hotdata_jupyter-0.2.2.tar.gz
- Upload date:
- Size: 92.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12c1df064e1b73eb4ec58cc82b27af6745d65fe10c1ed231d5508bf439d5ad78
|
|
| MD5 |
fe1eca473c037197ad764707f329c3ca
|
|
| BLAKE2b-256 |
7dbab4ded3654ec5f3a5785c759a440411e45b510941b9db8a21feb7fd31eb59
|
Provenance
The following attestation bundles were made for hotdata_jupyter-0.2.2.tar.gz:
Publisher:
publish.yml on hotdata-dev/hotdata-jupyter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hotdata_jupyter-0.2.2.tar.gz -
Subject digest:
12c1df064e1b73eb4ec58cc82b27af6745d65fe10c1ed231d5508bf439d5ad78 - Sigstore transparency entry: 1985702777
- Sigstore integration time:
-
Permalink:
hotdata-dev/hotdata-jupyter@3a42d9a64ec2ed91071a73f2cbcaca437f0a36d6 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/hotdata-dev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3a42d9a64ec2ed91071a73f2cbcaca437f0a36d6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hotdata_jupyter-0.2.2-py3-none-any.whl.
File metadata
- Download URL: hotdata_jupyter-0.2.2-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffd44d0e81d60cd9eaccecc072ba278bfc994cd0f460c0fe1126973f99a76990
|
|
| MD5 |
79df2909eaa6ec4e9f0bc2f8655ec332
|
|
| BLAKE2b-256 |
cdf82d68b400611679b7120929dd402962deb478bc2434e7532154d5c2b6d7f7
|
Provenance
The following attestation bundles were made for hotdata_jupyter-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on hotdata-dev/hotdata-jupyter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hotdata_jupyter-0.2.2-py3-none-any.whl -
Subject digest:
ffd44d0e81d60cd9eaccecc072ba278bfc994cd0f460c0fe1126973f99a76990 - Sigstore transparency entry: 1985702993
- Sigstore integration time:
-
Permalink:
hotdata-dev/hotdata-jupyter@3a42d9a64ec2ed91071a73f2cbcaca437f0a36d6 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/hotdata-dev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3a42d9a64ec2ed91071a73f2cbcaca437f0a36d6 -
Trigger Event:
push
-
Statement type: