Skip to main content

datapond

Public data, instantly queryable.

datapond gives you instant SQL access to curated DuckDB databases built from public data sources -- no full download, no API keys, no setup. DuckDB attaches the remote file over HTTP and fetches only the byte ranges your query touches.

Install

uv pip install datapond

Or with pip: pip install datapond

Using R? See datapond-r (pak::pak("datapond-db/datapond-r")).

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 proceedings 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 proceedings LIMIT 1000").df()  # pandas
pl = con.sql("SELECT * FROM proceedings LIMIT 1000").pl()   # polars

Explore the schema

Every database ships with a data dictionary (_metadata and _columns tables). describe() reads it:

datapond.describe("eoir")                        # tables with row counts and descriptions
datapond.describe("eoir", table="proceedings")   # columns, types, null %, examples, join hints
datapond.describe("eoir", search="judge")        # find columns by name across all tables

Remote vs local

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

# Remote -- attaches over HTTP; only the bytes your query needs are transferred
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. Tables are namespaced by database ID; IDs that contain a hyphen must be double-quoted in SQL:

con = datapond.connect(["cms-medicare", "openpayments"])

con.sql('SELECT * FROM "cms-medicare".physician_summary LIMIT 5').show()
con.sql("SELECT * FROM openpayments.general_payments LIMIT 5").show()

Both of those databases key providers by NPI ("cms-medicare".physician_summary.Rndrng_NPI and openpayments.general_payments.covered_recipient_npi), so they can be joined directly. Remote joins across large tables transfer a lot of data -- download both first (datapond.download(...), then connect([...], local=True)) for anything heavier than a quick look.

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/

# Re-download if the registry has a newer version
datapond update eoir

# Describe tables and columns
datapond describe eoir
datapond describe eoir --table proceedings
datapond describe eoir --search judge

# 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

Remote mode does transfer data: DuckDB issues HTTP range requests for the metadata and row groups a query touches, so SELECT COUNT(*) on a 37 GB table is cheap but SELECT * is not. What it avoids is the full download. datapond.download() fetches the whole file once so that every later query runs at disk speed.

Contributing

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

Credits

datapond is built and maintained by Ian Nason: the registry, this client, the website, and seven of the databases. The IPEDS database is built and maintained by Paul Goldsmith-Pinkham. See the registry's contributors section for the per-database breakdown.

License

MIT

Release files for datapond 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datapond 0.1.3
File Size Uploaded
datapond-0.1.3.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datapond 0.1.3
File Interpreter ABI Platform
datapond-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / datapond-0.1.3.tar.gz

Download URL datapond-0.1.3.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fdd65e5c06a14798d0ac520d50b398a49fc7f71cfe3806e088084b6726a3a78b
BLAKE2b-256 checksum
How to use checksums
c89c410a5a73e8e9dc1c4682b1e6c4945e2f76a4d7d59ab2c17b2b82f7c86191
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / datapond-0.1.3-py3-none-any.whl

Download URL datapond-0.1.3-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb06a647c50714b2c0e719c6cb164e1c8910dff692951fa84befd6224999ee24
BLAKE2b-256 checksum
How to use checksums
c0996644f2cb003d4d0dd7eceda1b554776ff7dd2a176c75629777ec9964c33b
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page