pypuppetdbquery package¶
-
pypuppetdbquery.
parse
(s, json=True, lex_options=None, yacc_options=None)[source]¶ Parse a PuppetDBQuery-style query and transform it into a PuppetDB “AST” query.
This function is intented to be the primary entry point for this package. It wraps up all the various components of this package into an easy to consume format. The output of this function is designed to be passed directly into
pypuppetdb
.For examples of the query syntax see puppet-puppetdbquery and node-puppetdbquery by Erik Dalén.
Parameters: - s (str) – The query to parse and transform
- json (bool) – Whether to JSON-encode the PuppetDB AST result
- lex_options (dict) – Options passed to
ply.lex.lex()
- yacc_options (dict) – Options passed to
ply.yacc.yacc()