def encode(self, value):
        padding = self.padding
        if self.precision > 0 and self.padding > 0:
            # Padding shouldn't include decimal digits or the decimal point.
            padding += self.precision + 1
        return ('%%0%d.%df' % (padding, self.precision)) % (value + self.offset)
Converts a python number into a padded string that is suitable for storage
dataset/ETHPy150Open saymedia/python-simpledb/simpledb/models.py/NumberField.encode