sqlo - Lightweight SQL Query Builder

A lightweight and simple SQL query builder for Python. Build SQL queries with a clean, intuitive API while staying safe from SQL injection.

Features

  • ðŸŠķ Lightweight: Zero dependencies, minimal footprint

  • âœĻ Simple: Intuitive fluent API, easy to learn

  • ðŸ›Ąïļ Secure by Default: Built-in SQL injection protection

  • 🐍 Pythonic: Fluent API design that feels natural to Python developers

  • ðŸ§Đ Composable: Build complex queries from reusable parts

Quick Example

from sqlo import Q

# SELECT query
query = Q.select("id", "name").from_("users").where("active", True)
sql, params = query.build()
# SQL: SELECT `id`, `name` FROM `users` WHERE `active` = %s
# Params: (True,)

Documentation

Indices and tables