Skip to main content
This guide explains how to connect to Kamu from Python scripts, applications, and Notebook environments like Jupyter.

Official Client Library

The easiest way to get started is the official kamu Python library available on PyPi. Insall:
Connect and query data via SQL:
Take a look at the library documentation for examples of authenticating, using different engines, and connecting to local workspaces.

Jupyter Notebooks

The official kamu Python library offers a few optional Jupyter integrations that you can install as:
Import the extension at the beginning of your notebook:
Create a connection:
You can now use %%sql cell magic:
This extension is pre-installed in the integrated notebook environment you can run via kamu notebook command line command. See Exploring Data section for a tutorial on using notebooks. For more information on extensions see the library documentation.

Google Colab

To install kamu in Colab environment use:
See also example Google Colab notebook.

Alternative Options

SQL Using ADBC

Kamu is based on the ADBC client API standard and the Flight SQL protocol, so any library that can work with those should be able to connect. Example using the official ADBC library and Pandas:

SQL Using SQLAlchemy

SQLAlchemy is a popular ORM library for Python that you can use to access data in Kamu in a same way as dozens of other data sources. It is row-oriented, so may be less efficient than using ADBC client for certain use cases. To use it you’ll need to install flightsql-dbapi package. Example:

SQL Using DBAPI2

DBAPI2 (aka PEP-249) is a standard DB access API in Python, but its row-oriented access to data may be less efficient than using ADBC client. To use it you’ll need to install flightsql-dbapi package. Example:
Last modified on March 16, 2026