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.

Parae data:Target object (a dict or a dict-like object) to query
Parameters:options – Keyword option may include ‘ac_query’ which is a string represents JMESPath expression.
Returns:Maybe queried result data, primitive (int, str, ...) or dict