Skip to main content

Instantly connect to curated DuckDB databases built from public data

Project description

datapond

Public data, instantly queryable.

datapond gives you instant SQL access to curated DuckDB databases built from public data sources -- no downloads, no API keys, no setup.

Install

uv pip install datapond

Or with pip: pip install datapond

For faster downloads from Hugging Face:

uv pip install "datapond[download]"

Quick start

Browse available databases

import datapond

# See what's available
datapond.list()

# Get details about a specific database
datapond.info("eoir")

Connect and query

import datapond

con = datapond.connect("eoir")
con.sql("SHOW TABLES").show()
con.sql("SELECT * FROM cases LIMIT 10").show()

The connection is a standard duckdb.Connection -- use it however you normally use DuckDB, including with pandas and Polars.

df = con.sql("SELECT * FROM cases LIMIT 1000").df()  # pandas
pl = con.sql("SELECT * FROM cases LIMIT 1000").pl()   # polars

Remote vs local

Every database can be queried remotely in seconds with no download required, or downloaded locally for full speed.

# Remote -- streams over HTTP, no download needed
con = datapond.connect("eoir")
con.sql("SELECT * FROM proceedings LIMIT 5").show()

# Local -- download once, query at full disk speed
datapond.download("eoir")
con = datapond.connect("eoir", local=True)

Download for offline use

datapond.download("eoir")

# Later, connect locally
con = datapond.connect("eoir", local=True)

Update a local database

datapond.update("eoir")

Multi-database queries

Attach multiple databases at once and query across them:

con = datapond.connect(["eoir", "foia"])

# Tables are namespaced by database ID
con.sql("SELECT * FROM eoir.cases LIMIT 5").show()
con.sql("SELECT * FROM foia.requests LIMIT 5").show()

CLI

datapond also includes a command-line interface:

# List available databases
datapond list

# Show database details
datapond info eoir

# Download a database
datapond download eoir --path ./data/

# Open an interactive SQL session
datapond connect eoir

How it works

datapond connects to read-only DuckDB files hosted remotely via the httpfs extension. The registry maintains a catalog of available databases with their URLs and metadata.

When you call datapond.connect(), it:

  1. Looks up the database in the registry
  2. Installs and loads the httpfs extension
  3. Attaches the remote DuckDB file as read-only
  4. Returns a connection ready for queries

No data is downloaded unless you explicitly call datapond.download().

Links

Contributing

Contributions are welcome. To add a new database to datapond, submit a pull request to the registry repository.

License

MIT

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

datapond-0.1.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

datapond-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file datapond-0.1.2.tar.gz.

File metadata

  • Download URL: datapond-0.1.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for datapond-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0a160b07491b6fde3eaf442ec6e25d45ec0d35188b40e8e09686dc946e37a6f5
MD5 14b58a2290a5b32885ab0f3ad8e3de13
BLAKE2b-256 4f739cd4c28c557861ba58cb6228722415608cf7fe02bc9eea437d6e36b09805

See more details on using hashes here.

File details

Details for the file datapond-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: datapond-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for datapond-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0012bafb65ecbb5ad2c37f0d7e17d74c8c835bc7a056c7800da0407f909435
MD5 646a1878c2fbca316037839e6aaf11d9
BLAKE2b-256 bd258d5c2e4206c8f9a0835157487050478b74083b55143d8600a9e911e2d694

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