PyPika
Python API that builds SQL queries through a builder interface, with query classes for several database platforms.
pypika.readthedocs.io/en/latest/repositorydocs
PyPika is a Python API that builds SQL queries through a builder pattern. A query is assembled from tables, fields and methods, and it becomes SQL text when cast to a string or passed through get_sql. The README presents it as a way to replace handwritten SQL, designed with data analysis in mind. Its platform-specific query classes handle differences between database vendors, such as quote characters.
Worth knowing
The README says validation of SQL correctness is not a goal, so the caller checks inputs and handles database errors.
Sources
- 2026-11-16: links
pypika.readthedocs.io/en/latest/ - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/kayak/pypika - 2026-11-16: Maintainer, Maintained by, Categories, Runtime, Minimum runtime, Install with, License, Databases
github.com/kayak/pypika/blob/master/README.rst - 2026-11-16: First release
pypi.org/pypi/pypika/json - 2026-11-16: Current major version, Last release
api.github.com/repos/kayak/pypika/releases - 2026-11-16: Contributors
api.github.com/repos/kayak/pypika/contributors