<commit_before>[![Build Status](https://travis-ci.org/dalen/puppet-puppetdbquery.png)](https://travis-ci.org/dalen/puppet-puppetdbquery)

PuppetDB query tools
====================

This module implements command line tools and Puppet functions that can be used to query puppetdb.
There's also a hiera backend that can be used to return query results from puppetdb.

Query format
============

The query format accepts resource references in the form:

    Type[Name]{attribute1=foo and attribute2=bar}

Each of the three parts are optional. It will only match non exported resources by default, to match exported resources add @@ in front.

Facts can be matched using the operators =, !=, >, < and ~ (regexp match). > and < only work on numbers, ~ only works on strings.<commit_msg>Add section about required PuppetDB version to README<commit_after>[![Build Status](https://travis-ci.org/dalen/puppet-puppetdbquery.png)](https://travis-ci.org/dalen/puppet-puppetdbquery)

PuppetDB query tools
====================

This module implements command line tools and Puppet functions that can be used to query puppetdb.
There's also a hiera backend that can be used to return query results from puppetdb.

Required PuppetDB version
=========================

This module uses the V4 API, and as such it requires at least PuppetDB 3.0.0.
If you are using PuppetDB 2.x please use the 1.x version of this module instead.

Query format
============

The query format accepts resource references in the form:

    Type[Name]{attribute1=foo and attribute2=bar}

Each of the three parts are optional. It will only match non exported resources by default, to match exported resources add @@ in front.

Facts can be matched using the operators =, !=, >, < and ~ (regexp match). > and < only work on numbers, ~ only works on strings.
{'fraction_non_alphanumeric': 0.11997798569069895, 'fraction_numerical': 0.00550357732526142, 'mean_word_length': 4.716981132075472, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '154902', 'n_tokens_mistral': 519, 'n_tokens_neox': 497, 'n_words': 223}