Records is a Python library for executing raw SQL queries against relational databases with a simple, elegant interface.
The library addresses the friction of working with SQL query results in Python. Rather than abstracting SQL behind an ORM, Records lets developers write SQL directly and handles the mechanics of connecting to the database, executing queries, and presenting results in convenient ways. It supports parameterized queries for safe value injection, works with most major relational databases including Postgres, MySQL, SQLite, Oracle, and MS-SQL, and reads database URLs from environment variables for configuration.
Records suits developers who are comfortable writing SQL and want to avoid ORM overhead. It works well for straightforward data retrieval tasks, reporting, and scripts where raw SQL is clearer than an abstraction layer. The tool distinguishes itself through tight integration with Tablib, enabling single-line exports of query results to CSV, JSON, YAML, Excel, or Pandas DataFrames. Row results support multiple access patterns—attribute access, dictionary-style indexing, or positional indexing—and handle field names with non-alphanumeric characters. The library also provides transaction support, bulk query operations, and a command-line tool for exporting query results.
Development activity on the project is minimal. The repository shows infrequent commits with long gaps between updates. Issue responses are sparse, and pull requests receive little engagement or review. The project appears to be in maintenance mode rather than active development, with no clear roadmap or momentum toward new features.