# kennethreitz/records

SQL for Humans™

Repository: https://github.com/kennethreitz/records
Canonical: https://ross.abutalabs.com/products/records
Homepage: https://pypi.python.org/pypi/records/
Language: Python
License: ISC
License Family: permissive
Topics: sql, postgres, sqlalchemy, python, orm, schemas, kennethreitz, forhumans
Last push: 2026-02-09T03:57:09+00:00

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

## Adoption (not part of the score)
Stars 7221, forks 567 (observed 2026-08-28T04:09:57.568542+00:00)

## What it is
Records is a Python library for making raw SQL queries to relational databases with a simple, human-friendly interface for accessing results. Built on SQLAlchemy and Tablib, it supports parameterized queries, transactions, and one-line export to CSV, JSON, YAML, HTML, XLS, or Pandas DataFrames.

## Use cases
- run raw sql queries from python without an orm
- export database query results to csv or json
- query postgres with simple parameterized sql
- generate reports from database queries
- access query rows as attributes or dict keys
- run sql queries from the command line

## When to choose
- you prefer writing plain SQL over ORM abstractions
- you need quick ad-hoc queries with ergonomic result access
- you want to export query results to multiple formats easily
- you want a lightweight wrapper around SQLAlchemy connections

## When to avoid
- you need an ORM with models, relationships, and migrations
- you need async database access
- you need advanced connection pooling or sharding features
- your project requires a very actively maintained library

## Facets
- artifact type: library
- maturity: maintenance
- function: database, database-driver, orm, serialization, cli
- domain: databases, data-science, developer-tools
- platform: python, cross-platform, cli
- tags: sql, sqlalchemy, tablib, raw-sql, query-results, data-export, postgres, mysql, sqlite, command-line

## Member repositories
- kennethreitz/records (main) score 52

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:57.568542+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-29T17:39:48.790706+00:00, confidence not recorded.
  - readme: https://github.com/kennethreitz/records (fetched 2026-08-28T04:09:57.568542+00:00, sha 0b8bda5ca29b)
  - homepage: https://pypi.python.org/pypi/records/ (fetched 2026-08-29T08:34:40.969571+00:00, sha 6ad022543de8)
  - registry_pypi: https://pypi.org/pypi/records/json (fetched 2026-08-29T08:34:40.978316+00:00, sha 33e94d09ac95)
- Data as of 2026-08-30T08:39:29.467469+00:00.
