Connect to Turbot Pipes from Jupyter Notebook

Since your Turbot Pipes workspace is just a Postgres database, you can use the standard psycopg2 adapter to query your workspace database from Python.

You can get the information needed to connect to your Turbot Pipes database instance from the Developers tab on the Steampipe page for your workspace.

It's the usual drill: import psycopg2, specify your connection string, create a connection, then run a query. (See also: Connect to Turbot Pipes from Python.)

In this example we connect from an instance of Jupyter Notebook running in VSCode, load the query results into a pandas.DataFrame, then use its describe method to summarize the data.

<img src="/images/docs/pipes/jupyter.png" style={{ boxShadow: 'none' }} />

Connect to Steampipe CLI from Jupyter Notebook

To connect Jupyter Notebook to Steampipe CLI, run steampipe service start --show-password and use the displayed connection details.

Call the Turbot Pipes API from Jupyter Notebook

You can also use the Turbot Pipes query API. Grab your token, put it an environment variable like PIPES_TOKEN, and use this pattern.