quartzbio.annotate module

class quartzbio.annotate.Annotator(fields, **kwargs)

Bases: object

Runs the synchronous annotate endpoint against batches of results from a query.

CHUNK_SIZE = 100
annotate(records, **kwargs)

Annotate a set of records with stored fields.

Parameters:
  • records – A list or iterator (can be a Query object)

  • chunk_size – The number of records to annotate at once (max 500).

Returns:

A generator that yields one annotated record at a time.

class quartzbio.annotate.Expression(expr, **kwargs)

Bases: object

Runs a single QuartzBio expression.

evaluate(data=None, data_type='string', is_list=False)

Evaluates the expression with the provided context and format.