def make_query(self, query_type, expression, **kwargs):
data = dict(expression=str(expression),<EOL>stop=kwargs.get('<STR_LIT>', datetime.utcnow()))<EOL>data.update(kwargs)<EOL>for k in ['<STR_LIT:start>', '<STR_LIT>']:<EOL><INDENT>if k in data:<EOL><INDENT>try:<EOL><INDENT>data[k] = data[k].isoformat()<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>r = requests.get(self.evaluator_url + query_type, params=data)<EOL>r.raise_for_status()<EOL>return r.json()<EOL>
Actually perform the query,
try to convert datetime to isoformat on the fly