# yhat/db.py

db.py is an easier way to interact with your databases

Repository: https://github.com/yhat/db.py
Canonical: https://ross.abutalabs.com/products/dbpy
Language: Python
License: BSD-2-Clause
License Family: permissive
Archived: true
Last push: 2021-08-02T12:32:38+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4329, "days_push": 1857, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1213, forks 110 (observed 2026-08-28T04:04:00.420440+00:00)

## What it is
db.py is a Python library that provides a friendlier interface for interacting with relational databases like PostgreSQL, MySQL, SQLite, Redshift, SQL Server, and Oracle. It integrates tightly with pandas and IPython to make exploring tables, columns, and query results easy and visually pleasant.

## Use cases
- query a postgres database and get results as a pandas dataframe
- explore database tables and columns interactively in a notebook
- run sql files against a database from python
- inspect table schemas with friendly formatted output
- quickly prototype analytics queries against mysql or redshift

## When to choose
- you use pandas and want database results as dataframes with minimal boilerplate
- you want an interactive, exploratory database experience in IPython or Jupyter
- you need a simple unified interface across several relational databases

## When to avoid
- you need an actively maintained library - the last release was in 2021
- you need async support, connection pooling, or an ORM with migrations
- you work with non-relational databases like MongoDB or Cassandra

## Facets
- artifact type: library
- maturity: maintenance
- function: database, database-driver
- domain: databases, data-science, developer-tools
- platform: python, cross-platform
- tags: pandas-integration, sql, ipython, query-helper, schema-exploration

## Member repositories
- yhat/db.py (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:00.420440+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:17:57.866308+00:00, confidence not recorded.
  - readme: https://github.com/yhat/db.py (fetched 2026-08-28T04:04:00.420440+00:00, sha bfc45b408c7b)
  - registry_pypi: https://pypi.org/pypi/db.py/json (fetched 2026-08-29T12:25:48.980804+00:00, sha 2ec4d2d94169)
- Data as of 2026-08-30T08:39:29.467469+00:00.
