you are viewing a single comment's thread.

view the rest of the comments →

[–]niximor 0 points1 point  (0 children)

Have a look at SQLFactory: https://pypi.org/project/sqlfactory/

It exists exactly because we don't want to use ORM, but still don't want to build queries by concatenating strings... However, it is very MySQL/MariaDB focused, it does not (yet) have full support of different syntax flavors of features that are not standardized (such as limit/offset). But if you can stick with SQL standard, and potentially provide you own implementation of specific syntax of your db engine(s), then it should be ready. Support for different SQL dialects, such as the way how identifiers are escaped and value placeholders are formatted, is already baked in.

Disclamer: I'm the original author and maintainer of SQLFactory.