You can use the Python SDK to work with Firebolt Core.

Prerequisites

  • Python 3.10 and up
  • Firebolt Core running locally

Installation

pip install "firebolt-sdk>=1.13.0"

Connection

from firebolt.db import connect
from firebolt.client.auth import FireboltCore

# Connect to Firebolt Core
# The database parameter defaults to 'firebolt' if not specified
with connect(
        auth=FireboltCore(),
        url="http://localhost:3473",
        database="firebolt"
) as connection:
    # Create a cursor
    cursor = connection.cursor()

    # Execute a simple test query
    cursor.execute("SELECT 1")

url and database parameters are optional and can be omitted. In such case they default to http://localhost:3473 and firebolt respectively.

auth=FireboltCore() is a required parameter and tells the SDK to connect to the Core instance.

Further reading