fleche.query

Classes

QueryIterator

Iterator that adds some convenience to plain iterators over calls of query result.

Module Contents

class fleche.query.QueryIterator[source]

Bases: Iterable[fleche.call.LazyCall]

Iterator that adds some convenience to plain iterators over calls of query result.

Parameters:

calls – (iterable of call.LazyCall): underlying results of the query

calls: Iterable[fleche.call.LazyCall][source]
__iter__() Iterator[fleche.call.LazyCall][source]
table(arguments: Iterable[str] = (), results=False) pandas.DataFrame[source]

Return a pandas DataFrame summarizing queried calls.

Arguments and results are elided.

The DataFrame index will be the lookup key (digest) of each call. Columns are:

  • name: the function name

  • module: the module name

  • ‘result`: if results argument is True

  • metadata fields are flattened and added as columns directly

If given argument names collide with any of the above columns, the are prefixed by ‘a_’. Only requested arguments are loaded from cache.

Parameters:
  • arguments (iterable of str) – add the given arguments (of the queried calls) as columns to the table

  • results (bool) – if True, add results of queried calls to table

Returns:

table of all calls on cache

Return type:

pandas.DataFrame

results() Iterable[Any][source]

Returns an iterable over the results of queried calls.