Basalt tables, in your notebook.
Install the Python SDK and load any view into a DataFrame. Results stream over Arrow, so large reads stay fast.
Install the Python SDK and load any view into a DataFrame. Results stream over Arrow, so large reads stay fast.
The SDK reads views over Arrow Flight and returns pandas or Polars DataFrames without a copy. A %%basalt cell magic runs SQL inline, and subscribe() yields new rows as they land.
pip install basalt and log in once. The SDK reads your token from the environment or from basalt auth login.
# authorize this notebook kernel basalt connect jupyter --role analyst
Write plain SQL over the source. Basalt keeps the view current with every record and tracks lineage back to the topic, partition and offset.
CREATE MATERIALIZED VIEW revenue_by_min AS SELECT date_trunc('minute', ts) AS minute, currency, sum(amount) AS revenue, count(*) AS payments FROM payments WHERE status = 'captured' GROUP BY 1, 2;
Every view is an endpoint the moment it exists. Call it over REST, connect with any Postgres client, or use the SDK from your app.
curl https://api.basalt.dev/v1/views/revenue_by_min?limit=5 \ -H "Authorization: Bearer $BASALT_TOKEN"
Results stream as Arrow batches, so a million rows load in about a second.
Call to_pandas() or to_polars() on any result with no conversion step.
%%basalt runs SQL in a cell and binds the result to a variable.
subscribe() yields new rows as they land, for live plots and checks.