Metadata-Version: 2.4
Name: sqlo
Version: 0.1.0
Summary: A modern, type-safe, and extensible SQL query builder for Python.
Project-URL: Homepage, https://github.com/nan-guo/sqlo
Project-URL: Repository, https://github.com/nan-guo/sqlo
License: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: bandit>=1.7.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: myst-parser>=2.0.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=3.0.0; extra == 'dev'
Requires-Dist: pytest>=7.1.2; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == 'dev'
Requires-Dist: sphinx>=7.0.0; extra == 'dev'
Requires-Dist: xenon>=0.9.0; extra == 'dev'
Description-Content-Type: text/markdown

# sqlo

[![CI](https://github.com/nan-guo/sqlo/actions/workflows/ci.yml/badge.svg)](https://github.com/nan-guo/sqlo/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/sqlo)](https://pypi.org/project/sqlo/)
[![License](https://img.shields.io/github/license/nan-guo/sqlo)](LICENSE)


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

## Why sqlo?

- 🪶 **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
- 🚀 **Extensible**: Support for custom dialects and functions
- 🔍 **Type-Safe**: Designed with type hints for better IDE support
- ✅ **Well-Tested**: 99% code coverage with comprehensive security tests

## Installation

```bash
pip install sqlo
```

## Quick Start

```python
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,)

# INSERT query
query = Q.insert_into("users").values([
    {"name": "Alice", "email": "alice@example.com"}
])
sql, params = query.build()
```

## Documentation

Full documentation is available on GitHub:

- [Getting Started](https://github.com/nan-guo/sqlo/blob/main/docs/getting-started.md)
- [Security Guide](https://github.com/nan-guo/sqlo/blob/main/docs/security.md) ⭐
- [SELECT Queries](https://github.com/nan-guo/sqlo/blob/main/docs/select.md)
- [INSERT Queries](https://github.com/nan-guo/sqlo/blob/main/docs/insert.md)
- [UPDATE Queries](https://github.com/nan-guo/sqlo/blob/main/docs/update.md)
- [DELETE Queries](https://github.com/nan-guo/sqlo/blob/main/docs/delete.md)
- [JOIN Operations](https://github.com/nan-guo/sqlo/blob/main/docs/joins.md)
- [Condition Objects](https://github.com/nan-guo/sqlo/blob/main/docs/conditions.md)
- [Expressions & Functions](https://github.com/nan-guo/sqlo/blob/main/docs/expressions.md)

## License

MIT License
