Skip to content

🧬 MoleQL v0.1.0 — First Public Release

Choose a tag to compare

@OneTesseractInMultiverse OneTesseractInMultiverse released this 07 Nov 23:05
· 21 commits to main since this release

Overview

This is the first official release of MoleQL,
a lightweight Python library that converts human-readable query-string expressions into structured, type-safe MongoDB queries.

MoleQL is designed for developers building APIs, CLI tools, or data pipelines that need to translate URL parameters like:

?age>30&country=US&status=in(active,pending)

into a clean MongoDB query document ready for find() or aggregation pipelines.

This initial version lays the foundation for the MoleQL syntax engine, including parsing, validation, and conversion to MongoDB-compliant filters, sort directives, projections, and text search operators.

🚀 Key Features

  • Filter operators: =, !=, <, <=, >, >=
  • List support: in(...), !=in(...)
  • Regex parsing: /pattern/flags → $regex + $options
  • Sorting: sort=-created_at,name
  • Pagination: skip=10, limit=50
  • Field selection: fields=name,email,age
  • Text search: text=search terms
  • Blacklisting: exclude restricted fields from parsing
  • Custom type casters: safely extend value conversions

🧱 Technical Highlights

  • Fully compatible with Python ≥ 3.12
  • Built using uv, pytest, and Ruff
  • CI/CD with GitHub Actions and Trusted PyPI Publishing
  • Extensible handler architecture (FilterHandler, SortHandler, etc.)
  • Clean, typed design using PEP-484 annotations and modern Python idioms

📦 Installation

pip install moleql
# or
uv add moleql

❤️ Acknowledgments

Created and maintained by Pedro Guzmán (@OneTesseractInMultiverse).
Special thanks to early contributors and the open-source Python community
for inspiration and tooling support (uv, Ruff, pytest, PyPA).