Metadata-Version: 2.4
Name: sqlo
Version: 0.0.1
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: 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: 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)


**sqlo** is a modern, type-safe, and extensible SQL query builder for Python. It allows you to construct complex SQL queries using a fluent, Pythonic API while ensuring safety against SQL injection.

## Features

- 🛡️ **Safe**: Automatic parameter binding prevents SQL injection.
- 🐍 **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.

## 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 in the [docs](docs/) directory.

- [Getting Started](docs/getting-started.md)
- [SELECT Queries](docs/select.md)
- [INSERT Queries](docs/insert.md)
- [UPDATE Queries](docs/update.md)
- [DELETE Queries](docs/delete.md)
- [JOIN Operations](docs/joins.md)
- [Condition Objects](docs/conditions.md)
- [Expressions & Functions](docs/expressions.md)

## License

MIT License
