tcex.tcex_data_filter module

Data Filter Module

class tcex.tcex_data_filter.DataFilter(tcex, data)[source]

Bases: object

Filter Single Level List of Dictionaries (JSON Object)


Build indexes from data for fast filtering of data.

Building indexes of data when possible. This is only supported when dealing with a List of Dictionaries with String values.

filter_data(field, filter_value, filter_operator, field_converter=None)[source]

Filter the data given the provided.

  • field (string) – The field to filter on.
  • filter_value (string | list) – The value to match.
  • filter_operator (string) – The operator for comparison.
  • field_converter (method) – A method used to convert the field before comparison.

List of matching data objects

Return type:



Supported Filter Operators

  • EQ - Equal To
  • NE - Not Equal To
  • GT - Greater Than
  • GE - Greater Than or Equal To
  • LT - Less Than
  • LE - Less Than or Equal To
  • SW - Starts With
  • IN - In String or Array
  • NI - Not in String or Array
static results(data)[source]


class tcex.tcex_data_filter.DataObj(data)[source]

Bases: object

Data Object


The data as a string


The data value