Skip to content

oraichain/duckdb-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DuckDB HTTP SQLAlchemy Plugin

A lightweight SQLAlchemy dialect/plugin for connecting to DuckDB, on top of httpserver duckdb extension. Works with Superset for visualization.

Features


Installation

pip install duckdb_http

Usage

1. Connect to DuckDB

from sqlalchemy import create_engine, text

# Connect to local DuckDB database
engine = create_engine("duckdb_http://user:pass@localhost:9999")
# engine = create_engine("duckdb_http://localhost:9999?api_key=secretkey")

with engine.connect() as conn:
    # Execute queries using SQLAlchemy text()
    result = conn.execute(text("SELECT 1"))
    print(result.fetchone())

Notes

  • Always wrap raw SQL with text() when using SQLAlchemy 2.x.
  • Compatible with Superset: once installed, you can select DuckDB as a database backend.
  • Supports multiple schemas and introspection.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages