class client(metaclass=harvester): # some descriptors sku = descriptors.int(default='4503') cost = money(default="$1,302.34") # register a preprocessor @descriptors.converter(traits=[cost]) def strip(value, **kwds): return ''.join(money.filter.split(value))
class client(metaclass=harvester): # some descriptors sku = descriptors.int(default=4503) cost = money(default=2.34)
class client(metaclass=harvester): # some descriptors sku = descriptors.int(default=4503) cost = descriptors.float(default=2.34) weight = descriptors.dimensional(default='.5 * lb') price = 2 * cost + .5