Python client

pip install federiq
pip install 'federiq[pandas]'   # optional pandas helper

Quickstart

import federiq

engine = federiq.connect("./federiq.yaml")

rows = engine.query("SELECT 1 AS n")
print(rows)  # [{'n': 1}]

df = federiq.query_df(engine, "SELECT COUNT(*) AS n FROM events")
print(df)

API

class Engine:
    @staticmethod
    def from_catalog(path: str) -> "Engine": ...
    def attach(self, source: dict) -> None: ...
    def query(self, sql: str) -> list[dict]: ...
    def explain(self, sql: str) -> str: ...
    def explain_analyze(self, sql: str) -> str: ...
    def attach_timings(self) -> list[dict]: ...
    def duckdb_version(self) -> str: ...

Jupyter

See examples/jupyter/federiq_intro.ipynb for an interactive walkthrough.