Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Norm, A Simple Python SQL generation library (github.com/justinvanwinkle)
8 points by ltbarcly3 on July 3, 2020 | hide | past | favorite | 1 comment



I created this to provide a simple way to generate SQL after becoming frustrated with other libraries.

Things that distinguish this library from other SQL generation libraries:

- (N)ot an (ORM), so there are no schemas or table definitions to maintain in code.

- is really dumb. It is just doing string concatenation internally, so whatever you type into it will appear as is in the query.

- lets you build up queries safely, like most other SQL generation libraries.

- provides a simple, consistent wrapper for Python DB-API libraries, while still directly exposing all the functionality of those libraries

- code looks almost identical to the generated SQL

- the generated SQL is very nicely formatted for humans to read (either for debugging or in database logs).

- makes it possible to safely generate multiple row inserts in a single INSERT statement, even with heterogeneous columns in each row.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: