https://github.com/openstack/yaql
Yet another query language. Mirror of code maintained at opendev.org.
https://github.com/openstack/yaql
Last synced: 4 months ago
JSON representation
Yet another query language. Mirror of code maintained at opendev.org.
- Host: GitHub
- URL: https://github.com/openstack/yaql
- Owner: openstack
- License: apache-2.0
- Created: 2014-11-13T21:57:12.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-06-05T13:12:32.000Z (7 months ago)
- Last Synced: 2025-07-25T12:51:26.047Z (5 months ago)
- Language: Python
- Homepage: https://opendev.org/openstack/yaql
- Size: 567 KB
- Stars: 147
- Watchers: 10
- Forks: 33
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
YAQL: Yet Another Query Language
================================
YAQL (Yet Another Query Language) is an embeddable and extensible query
language, that allows performing complex queries against arbitrary objects. It
has a vast and comprehensive standard library of frequently used querying
functions and can be extend even further with user-specified functions. YAQL is
written in python and is distributed via PyPI.
Quickstart
----------
Install the latest version of yaql:
pip install yaql>=1.0.0
Run yaql REPL:
yaql
Load a json file:
yaql> @load my_file.json
Check it loaded to current context, i.e. `$`:
yaql> $
Run some queries:
yaql> $.customers
...
yaql> $.customers.orders
...
yaql> $.customers.where($.age > 18)
...
yaql> $.customers.groupBy($.sex)
...
yaql> $.customers.where($.orders.len() >= 1 or name = "John")
...
yaql> let(min_orders => $.min_orders)
... -> $.customers.where($.orders.len() >= $min_orders)
Project Resources
-----------------
* `Official Documentation `_
* Project status, bugs, and blueprints are tracked on
`Launchpad `_
License
-------
Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0