def __init__(self, rules, whitelist=[], safe_mode=True):
self.parser = QueryParser()<EOL>self.guard = Guard(rules)<EOL>self.sanitizer = Sanitizer()<EOL>self.whitelist = whitelist<EOL>self.safe_mode = safe_mode<EOL>
:param rules: A list of rules to evaluate
:param safe_mode: If set to True, allow the query in case it can not be parsed
:return: