hotdata-langgraph
LangGraph nodes for Hotdata — run SQL and manage databases as first-class graph nodes that read from and write to your state dict.
Install
pip install hotdata-langgraph
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
from langgraph.graph import StateGraph
import hotdata_langgraph as hlg
client = hlg.from_env()
builder = StateGraph(dict)
builder.add_node("run_sql", hlg.make_execute_sql_node(client=client))
builder.set_entry_point("run_sql")
builder.set_finish_point("run_sql")
graph = builder.compile()
result = graph.invoke({"sql": "SELECT * FROM orders LIMIT 10"})
print(result["result"]) # list of row dicts
SQL node
The SQL node reads a query from state, executes it on Hotdata, and writes the rows back to state.
# Factory: create a reusable node function
execute_sql = hlg.make_execute_sql_node(client=client)
builder.add_node("run_sql", execute_sql)
# State in: {"sql": "SELECT ..."}
# State out: {"result": [{"col": val, ...}, ...]}
Managed database nodes
# Create a managed database
create_db = hlg.make_create_managed_database_node(client=client)
# State in: {"database_name": "sales", "schema": "public", "tables": "orders,customers"}
# State out: {"database": {"id": "...", "description": "sales"}}
# Load a parquet file into a table
load_table = hlg.make_load_managed_table_node(client=client)
# State in: {"database": "sales", "table": "orders", "file": "/path/to/orders.parquet"}
# State out: {"load_result": {"full_name": "sales.public.orders", "row_count": 1500, ...}}
Scoping queries to a managed database
Pass database= so all SQL the node runs resolves against a specific managed database:
execute_sql = hlg.make_execute_sql_node(client=client, database="sales")
Custom state keys
Override the default key names to fit your graph's state schema:
execute_sql = hlg.make_execute_sql_node(
client=client,
sql_key="query", # reads from state["query"] instead of state["sql"]
output_key="rows", # writes to state["rows"] instead of state["result"]
)
The same *_key pattern applies to all nodes.
Run the example
uv run python examples/langgraph_basic.py
Development
uv sync --locked
uv run pytest
Metadata
Release files for hotdata-langgraph 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hotdata_langgraph-0.2.2.tar.gz | 149.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hotdata_langgraph-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 154.3 kB
Release files / hotdata_langgraph-0.2.2.tar.gz
| Download URL | hotdata_langgraph-0.2.2.tar.gz |
|---|---|
| Size | 149.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0e93545b70a9860e831d2d269cb0b4039cc199708a14d977539df56362400b1
|
|
BLAKE2b-256 checksum How to use checksums |
3920728ef6188ee04be8b8f25d5631b3faf3de286f8133df851c348d840d541a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jun 27, 2026.
Transparency logRelease files / hotdata_langgraph-0.2.2-py3-none-any.whl
| Download URL | hotdata_langgraph-0.2.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f582bcf268bc81ee8744b3edd059bd095963fdfc212bb99e6976fc69904b165
|
|
BLAKE2b-256 checksum How to use checksums |
31bf84ab33c7b1bcf6394d876e2aebfa88ba35984706c0c9745c7f4ac01371b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jun 27, 2026.
Transparency log