Metadata-Version: 2.4
Name: exonware-xwquery
Version: 0.9.0.5
Summary: Universal query language for data structures - 50+ operations, 35+ format converters
Project-URL: Homepage, https://exonware.com
Project-URL: Repository, https://github.com/exonware/xwquery
Project-URL: Documentation, https://github.com/exonware/xwquery#readme
Project-URL: Subtree, https://github.com/exonware/xwquery.git
Author-email: eXonware Backend Team <connect@exonware.com>
License: MIT
License-File: LICENSE
Keywords: conversion,cypher,data,exonware,graphql,query,sparql,sql
Requires-Python: >=3.12
Requires-Dist: exonware-xwsyntax
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: exonware-xwlazy; extra == 'dev'
Requires-Dist: exonware-xwsyntax[dev]; extra == 'dev'
Requires-Dist: isort>=5.12.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Provides-Extra: full
Requires-Dist: aiofiles; extra == 'full'
Requires-Dist: atomicwrites; extra == 'full'
Requires-Dist: attrs; extra == 'full'
Requires-Dist: bcrypt; extra == 'full'
Requires-Dist: bottleneck; extra == 'full'
Requires-Dist: brotli; extra == 'full'
Requires-Dist: cachebox; extra == 'full'
Requires-Dist: cachetools; extra == 'full'
Requires-Dist: cbor2; extra == 'full'
Requires-Dist: charset-normalizer; extra == 'full'
Requires-Dist: cloudpickle; extra == 'full'
Requires-Dist: cryptography; extra == 'full'
Requires-Dist: cython; extra == 'full'
Requires-Dist: dicttoxml; extra == 'full'
Requires-Dist: exonware-xwsyntax[full]; extra == 'full'
Requires-Dist: httpx; extra == 'full'
Requires-Dist: hyperlight-hyperjson; extra == 'full'
Requires-Dist: interegular; extra == 'full'
Requires-Dist: json5; extra == 'full'
Requires-Dist: lz4; extra == 'full'
Requires-Dist: msgpack; extra == 'full'
Requires-Dist: msgspec; extra == 'full'
Requires-Dist: numexpr; extra == 'full'
Requires-Dist: opentelemetry-api; extra == 'full'
Requires-Dist: orjson; extra == 'full'
Requires-Dist: pandas; extra == 'full'
Requires-Dist: psutil; extra == 'full'
Requires-Dist: pyarrow; extra == 'full'
Requires-Dist: pylru; extra == 'full'
Requires-Dist: pymongo; extra == 'full'
Requires-Dist: pytz; extra == 'full'
Requires-Dist: pyyaml; extra == 'full'
Requires-Dist: regex; extra == 'full'
Requires-Dist: rich; extra == 'full'
Requires-Dist: tomli-w; extra == 'full'
Requires-Dist: uarray; extra == 'full'
Requires-Dist: xmltodict; extra == 'full'
Requires-Dist: zstandard; extra == 'full'
Provides-Extra: lazy
Requires-Dist: exonware-xwlazy; extra == 'lazy'
Requires-Dist: exonware-xwsyntax[lazy]; extra == 'lazy'
Description-Content-Type: text/markdown

# xwquery

**One universal query language.** Execute on Python data or convert between SQL, GraphQL, Cypher, and 35+ formats with a single engine. One script (XWQS) for the zone; used by xwstorage, xwaction, xwbase.

**Company:** eXonware.com · **Author:** eXonware Backend Team · **Email:** connect@exonware.com  
**Version:** [version.py](src/exonware/xwquery/version.py) (`__version__`, `__date__`)

[![Status](https://img.shields.io/badge/status-alpha-orange.svg)](https://exonware.com)
[![Python](https://img.shields.io/badge/python-3.12%2B-blue.svg)](https://www.python.org)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

---

## Install

```bash
pip install exonware-xwquery
```

Requires xwsystem; xwsyntax for grammars. See [docs/GUIDE_01_USAGE.md](docs/GUIDE_01_USAGE.md) for details.

---

## Quick start

```python
from exonware.xwquery import XWQuery

data = {'users': [
    {'name': 'Alice', 'age': 30, 'city': 'NYC'},
    {'name': 'Bob', 'age': 25, 'city': 'LA'},
    {'name': 'Charlie', 'age': 35, 'city': 'NYC'},
]}

result = XWQuery.execute("""
    SELECT name, age
    FROM users
    WHERE age > 25 AND city = 'NYC'
""", data)
# result.data → [{'name': 'Alice', 'age': 30}, {'name': 'Charlie', 'age': 35}]
```

Convert between formats: `XWQuery.convert(sql_string, from_format='sql', to_format='graphql')`.  
Parse only: `XWQuery.parse("SELECT * FROM users", source_format='sql')`.  
Key code: [REF_14_DX](docs/REF_14_DX.md) · API: [REF_15_API](docs/REF_15_API.md).

---

## What you get

| Area | Description |
|------|-------------|
| **Execution** | Run queries on any Python data (node or table). Parse → plan → execute; one engine, one contract. |
| **Grammars** | 35+ formats (SQL, GraphQL, Cypher, SPARQL, MQL, PromQL, JQ, JMESPath, …) via xwsyntax. Parse, generate, validate. |
| **Operations** | CRUD, filtering, aggregation, graph (MATCH, PATH), JOIN, UNION, WINDOW, PIPE, and more. |
| **Integration** | Consumed by xwstorage, xwaction, xwbase. One universal script (XWQS); zone execution (e.g. S3) converts to XWQS first. |

Current phase: **Alpha.** Executor refactor and doc alignment in progress. Status: [REF_22_PROJECT](docs/REF_22_PROJECT.md#project-status-overview).

---

## Docs and tests

- **Start:** [docs/INDEX.md](docs/INDEX.md)
- **Usage:** [docs/GUIDE_01_USAGE.md](docs/GUIDE_01_USAGE.md)
- **Requirements and status:** [REF_01_REQ](docs/REF_01_REQ.md), [REF_22_PROJECT](docs/REF_22_PROJECT.md)
- **API and design:** [REF_15_API](docs/REF_15_API.md), [REF_13_ARCH](docs/REF_13_ARCH.md), [REF_14_DX](docs/REF_14_DX.md)
- **Tests:** [REF_51_TEST](docs/REF_51_TEST.md). Run from project root (pytest or project test runner).

---

## License and links

MIT — [LICENSE](LICENSE).  
**Homepage:** https://exonware.com · **Repository:** https://github.com/exonware/xwquery  

Contributing → CONTRIBUTING.md · Security → SECURITY.md (when present).

*Built with ❤️ by eXonware.com - Revolutionizing Python Development Since 2025*
