from enum import Enum # create an enum with all aggregation types class Aggregation(Enum): NONE = 0 SUM = 1 AVERAGE = 2 COUNT = 3 id2aggregation = {x.value: x.name for x in Aggregation}