anyconfig.query
¶
anyconfig.query module to support query data with JMESPath expressions.
Changelog:
-
New in version 0.8.3:
Added to query config data with JMESPath expression, http://jmespath.org
-
anyconfig.query.
query
(data, **options)¶ Filter data with given JMESPath expression.
See also: https://github.com/jmespath/jmespath.py and http://jmespath.org.
- Parameters
data – Target object (a dict or a dict-like object) to query
options – Keyword option may include ‘ac_query’ which is a string represents JMESPath expression.
- Returns
Maybe queried result data, primitive (int, str, …) or dict