buildgrid.server.operations.filtering.parser module

class buildgrid.server.operations.filtering.parser.FilterParser

Bases: object

Utility class primarily used to parse a filter string and return a list a OperationFilters.

lark_parser = Lark(open('/builds/BuildGrid/buildgrid/.tox/docs/lib/python3.8/site-packages/buildgrid/server/operations/filtering/filter_grammar.lark'), parser='earley', lexer='dynamic', ...)
static parse_listoperations_filters(filter_string: str) List[OperationFilter]

Separate the lowercase filter string into individual components, and return a map containing the relevant filters to use.

Filter strings take the following form: key1=value1&key2=value2,value3&key3=value4 All spaces in the input are ignored.

Filter options are separated with ampersands (&). If a key is repeated, the combined set of values are treated as a logical conjunction (AND).