Skip to main content

DuckDB HTTP dialect for SQLAlchemy

Project description

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

git clone https://github.com/oraichain/duckdb-http.git

Then, install this plugin (if packaged locally):

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duckdb_http-0.1.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duckdb_http-0.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file duckdb_http-0.1.tar.gz.

File metadata

  • Download URL: duckdb_http-0.1.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for duckdb_http-0.1.tar.gz
Algorithm Hash digest
SHA256 504abdc04f2d5f8f92b4180b0519dd7b545963f389338fcafce4ef09667abb8c
MD5 7c1534d0f21224df6c0bd26c7f0dd00f
BLAKE2b-256 2c9e8e3003427bc079e32aadb75a2c3c2550a2644417d16dbd2c8cad90ea59eb

See more details on using hashes here.

File details

Details for the file duckdb_http-0.1-py3-none-any.whl.

File metadata

  • Download URL: duckdb_http-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for duckdb_http-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7d6921922a5470a4f17f22848c4ede0288f944496d777b1c3544dd393a32cbe
MD5 55517fbabbcf85411dbd58edd5179a38
BLAKE2b-256 2bae1edb413b27486217f42a823e69e1e234376ef672129617980f49617e8f6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page