tiled.queries.Comparison

class tiled.queries.Comparison(operator, key, value)[source]

Query binary comparison between given key’s value to the specified value.

See Key in this module for a more intuitive interface for comparisons.

Parameters:
operator{“gt”, “lt”, “ge”, “le”}
keystr

e.g. “temperature”

valueJSONSerializable

May be a string, number, list, or dict.

Examples

Search for temperature > 300.

>>> c.search(Comparison("gt", "temperature", 300))
__init__(operator, key, value)[source]

Methods

__init__(operator, key, value)

decode(*, operator, key, value)

encode()

Attributes

operator

key

value