skillfed

records

SQL for Humans

records v0.6.0 268.9K downloads/30d#8,266 on PyPI7,220
Permissive license ISC AGING released

What it is and what it does

Records is a minimal SQL query wrapper built on SQLAlchemy and Tablib that lets you execute raw SQL against relational databases and work with results as Python objects. It supports Postgres, MySQL, SQLite, Oracle, RedShift, and MS-SQL through SQLAlchemy's driver ecosystem, and returns rows as Record objects accessible by attribute name, dictionary key, or index position.

The package is designed for developers who prefer writing SQL directly rather than using an ORM. Beyond basic querying, it includes transaction support, parameterized queries, bulk operations, and integration with Tablib for exporting results to CSV, JSON, YAML, XLS, XLSX, or Pandas DataFrames. A command-line tool is also available for ad-hoc query export.

Use it for:

  • Export database query results to CSV, JSON, or Excel for reporting or data sharing.
  • Execute raw SQL queries and iterate over results without ORM overhead in data pipelines.
  • Build command-line tools that query databases and format output in multiple formats.
  • Access query results flexibly by column name, index, or dictionary key in the same workflow.
  • Run parameterized queries safely against multiple database backends with a single API.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Records provides a lightweight SQL query interface for relational databases, letting you write raw SQL and access results as objects with attribute, dictionary, and index-based access.

Yes, if you prefer writing SQL directly and need a lightweight result wrapper with export capabilities. The permissive license, low install friction, and stable API make it a reasonable choice for simple query workflows. However, the aging maintenance status (868 days since last release) means you should verify compatibility with your specific database drivers and Python version before committing to production use.

Install

records on PyPI

pip

pip install records

uv

uv add records

poetry

poetry add records

Installing records

Before you install

Low install friction with a pure-Python wheel and four runtime dependencies. Maintenance is aging—last release was 868 days ago—but the repository remains active and the package is marked Production/Stable with 7220 GitHub stars.

License in practice

Licensed under ISC (permissive), allowing free use, modification, and distribution with minimal restrictions.

Quickstart

import records

db = records.Database('postgres://user:pass@localhost/dbname')
rows = db.query('SELECT * FROM users')
for row in rows:
    print(row.name, row.email)

Requires a database driver for your target database (e.g., psycopg2 for PostgreSQL, mysql-connector-python for MySQL); Records itself does not include drivers.

Verify before relying

  • Whether the aging maintenance status (last release 868 days ago) affects compatibility with recent database driver versions.
  • Performance characteristics for large result sets compared to other query libraries.

Package facts

License ISC (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 4 — SQLAlchemy, tablib, openpyxl, docopt
Maintenance aging — 868 days since the last release
Last repo commit
First released
Downloads 268,909/month — #8,266 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: records-0.6.0-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Natural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

raw SQL query interfacesimple database queriesSQL without ORMquery results as objectsdatabase result exportSQL to CSV JSON Excellightweight SQL wrapper
sql-query-wrapperdata-export

More Database packages