{"repo":"kennethreitz/records","free":true,"listed":false,"github":"https://github.com/kennethreitz/records","clone":"git clone https://github.com/kennethreitz/records.git","description":"SQL for Humans™","language":"Python","stars":7221,"topics":["sql","postgres","sqlalchemy","python","orm","schemas","kennethreitz","forhumans"],"license":"ISC","category":"databases-storage","readme_excerpt":"Records: SQL for Humans™ Records is a very simple, but powerful, library for making raw SQL queries to most relational databases. Just write SQL. No bells, no whistles. This common task can be surprisingly difficult with the standard tools available. This library strives to make this workflow as simple as possible, while providing an elegant interface to work with your query results. Database support includes RedShift, Postgres, MySQL, SQLite, Oracle, and MS-SQL (drivers not included). ☤ The Basics We know how to write SQL, so let's send some to our database: Grab one row at a time: Or iterate over them: Values can be accessed many ways: row.user email , row['user email'] , or row[3] . Fields with non-alphanumeric characters (like spaces) are also fully supported. Or store a copy of your record collection for later reference: If you're only expecting one result: Other options include rows.as dict() and rows.as dict(ordered=True) . ☤ Features - Iterated rows are cached for future reference. - $DATABASE URL environment variable support. - Convenience Database.get table names method. - Command-line records tool for exporting queries. - Safe parameterization: Database.query('life=:everything', everything=42) . - Queries can be passed as strings or filenames, parameters supported. - Transactions: t = Database.transaction(); t.commit() . - Bulk actions: Database.bulk query() & Database.bulk query file() . Records is proudly powered by SQLAlchemy and Tablib. ☤ Data Export Functional","default_branch":null,"files":null,"tree":[],"storefront":"/r/kennethreitz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kennethreitz/records/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}