pycon logo

PyCon 2011 Atlanta

March 9th–17th

Log in or Sign Up

HTSQL - an insanely good WSGI / REST interface to your favorite database

log in to bookmark this presentaton

Novice / Talk
March 12th 11:45 a.m. – 12:30 p.m.
HTSQL is a URI-based high-level query language for relational databases; it is written in the Python language. HTSQL is a wonderful complement existing WSGI-based applications, making it trivial to create interactive dashboards, complex reports. We use HTSQL as a REST query interface for data integration and ad-hoc reporting by technical users or ``accidental programmers``.


The HTSQL processor is a high-level URI-based query language for relational databases such as SQLite, PostgreSQL or MySQL. Since it's written in Python, it is easy to integrate and generates immediate value as the core of your application's custom reporting engine. HTSQL is like the Django or SQLAlchemy ORMs in that it generates SQL, but unlike an ORM in that its design center is completely different -- it was created for hard core reporting and not object to relational mapping. Hence, it is a wonderful complement to existing WSGI-based applications to easily create dashboards, complex reports. We use HTSQL as a REST reporting interface for data integration and ad-hoc queries.

This talk will have two parts. In the first part we'll give a brief overview of the rationale and design of the query language. In the second part, we'll show how to hook the HTSQL processor into your WSGI application and how to make custom commands, such as a simple calendar output from a table containing a date column.

The talk will be presented by Clark Evans, HTSQL was developed by Kyrylo Simonov. The main HTSQL site is and the code is at It'll be similar to previous talks, such as