duckbridge
Lightweight Python wrapper around the DuckDB extension, httpserver (extension developed by @quackscience)
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
·
Repository
Lightweight Python wrapper around the DuckDB extension, httpserver (extension developed by @quackscience)
Basic Info
- Host: GitHub
- Owner: MHromiak
- License: mit
- Language: Python
- Default Branch: main
- Size: 152 KB
Statistics
- Stars: 17
- Watchers: 0
- Forks: 0
- Open Issues: 2
- Releases: 2
Created 9 months ago
· Last pushed 7 months ago
Metadata Files
Citation
https://github.com/MHromiak/duckbridge/blob/main/
# DuckBridge
Lightweight Python library enabling fully pythonic interfacing with the DuckDB extension `httpserver` (extension developed by @quackscience).
[](https://pypi.org/project/duckbridge/)
[](https://github.com/mhromiak/duckbridge/actions/workflows/cd_pypi_publish.yml)
[](https://codecov.io/gh/mhromiak/duckbridge)
## What is duckbridge?
DuckDB's httpserver extension turns databases into HTTP OLAP servers; however, setup and access require unix commands and SQL in order to properly set up authentication, install the extension, and communicate.
`duckbridge` spans this gap, providing a way to natively use `httpserver` with full pythonic scripting. The `DuckDBServer` class acts as the bridge operator, connecting to the database, initializing `httpserver`, and setting authentication values and read/write privileges. `DuckDBClient` provides a tidy handler which stores client-side authentication and endpoint information, ensuring one-factor authentication by way of knowledge while returning information as a Pandas DataFrame.
## How do I use duckbridge?
Duckbridge is split into two main portions: `DuckbridgeServer`, which handles extension installation/activation, database connection, and client request processing, and `DuckbridgeClient`, which formats and sends requests to an assumed endpoint, unmarshalling returned data into a convenient format (currently only a Pandas DataFrame).
Examples of how to set up a server or client can be found in more depth at , a repository of tutorials that is constantly being updated.
If you have a use case that you would like to have considered, please  and it will be addressed!
### Quick start copy-and-paste
```python
####################
### Server setup ###
####################
from duckbridge import *
import os
my_ssh_key_auth : str = "mySuperSecretSSHString"
ssh_userpass_auth : str = "username:password" # !!!The colon is mandatory!!!
my_host : str = "127.0.0.1" # Replace with 0.0.0.0 for public ip access
my_port : int = 8080
bridge : DuckbridgeServer = DuckbridgeServer()
# Assumes readonly permissions and that the database doesn't have `httpserver` installed yet
# If an empty string is provided for auth_info, then no security will be used
bridge.start(os.cwd() + "/path/to/db.db", host=my_host, port=my_port, auth_info=my_ssh_key_auth)
####################
### Client setup ###
####################
from duckbridge import *
import pandas as pd
my_username : str = "username"
my_password : str = "password"
client : DuckbridgeClient = DuckbridgeClient(my_host, my_port, my_username, my_password, my_ssh_key_auth)
data : pd.DataFrame = client.execute("Select * from concept limit 3;", auth="ssh")
```
Owner
- Name: Markian Hromiak
- Login: MHromiak
- Kind: user
- Location: St. Louis
- Company: Mastercard
- Repositories: 2
- Profile: https://github.com/MHromiak
Computer Scientist and Software Engineer; GT BS in CS, GT AI grad student. Hoping to teach robots how to think sometime in the future.
Citation (CITATION.bib)
@misc{duckbridge,
author = {MHromiak <markian.hromiak@yahoo.com> and contributors},
title = {duckbridge},
url = {https://github.com/MHromiak/duckbridge},
version = {0.3.0},
year = {2025},
month = {7}
}
GitHub Events
Total
- Create event: 4
- Issues event: 1
- Release event: 2
- Watch event: 13
- Delete event: 2
- Push event: 19
- Pull request event: 6
Last Year
- Create event: 4
- Issues event: 1
- Release event: 2
- Watch event: 13
- Delete event: 2
- Push event: 19
- Pull request event: 6
Issues and Pull Requests
Last synced: 6 months ago
Packages
- Total packages: 1
-
Total downloads:
- pypi 123 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: duckbridge
A lightweight client-server library fluently extending DuckDB's httpserver setup to Python
- Documentation: https://duckbridge.readthedocs.io/
- License: MIT
-
Latest release: 0.4.1
published 7 months ago
Rankings
Dependent packages count: 8.8%
Average: 29.2%
Dependent repos count: 49.6%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DuckBridge/poetry.lock
pypi
- alabaster 1.0.0
- babel 2.17.0
- certifi 2025.4.26
- charset-normalizer 3.4.2
- colorama 0.4.6
- docutils 0.21.2
- duckdb 1.3.0
- idna 3.10
- imagesize 1.4.1
- jinja2 3.1.6
- markupsafe 3.0.2
- numpy 2.2.6
- packaging 25.0
- pandas 2.2.3
- pygments 2.19.1
- python-dateutil 2.9.0.post0
- pytz 2025.2
- requests 2.32.3
- roman-numerals-py 3.1.0
- six 1.17.0
- snowballstemmer 3.0.1
- sphinx 8.2.3
- sphinxcontrib-applehelp 2.0.0
- sphinxcontrib-devhelp 2.0.0
- sphinxcontrib-htmlhelp 2.1.0
- sphinxcontrib-jsmath 1.0.1
- sphinxcontrib-qthelp 2.0.0
- sphinxcontrib-serializinghtml 2.0.0
- tzdata 2025.2
- urllib3 2.4.0
DuckBridge/pyproject.toml
pypi
- sphinx ^8.2.3 develop
- duckdb (>=1.3.0,<2.0.0)
- pandas (>=2.2.3,<3.0.0)
- requests (>=2.32.3,<3.0.0)