def __init__(self, offset_percent=None, valid_chars=None, string_length=None, minimum_length=5):

        self.valid_chars = valid_chars or DEFAULT_VALID_CHARS
        # For convenience and speed
        self.number_valid_chars = len(self.valid_chars)

        minimum_length = minimum_length or DEFAULT_MINIMUM_LENGTH
        self.minimum_size = self.number_valid_chars ** minimum_length - 1

        # This just means we don't start with the first number, to mix things up
        self.offset_percent = offset_percent or DEFAULT_OFFSET_PERCENT

        # This is used to store already calculated periods, for speed and consistency
        self._period_cache = {}
        self._offset_cache = {}

        # Don't set this, it isn't necessary and you'll get ugly strings like 'AAAAAB3D'
        # String length is automatically determined. Use only in an emergency
        self.string_length = string_length or DEFAULT_STRING_LENGTH
dataset/ETHPy150Open willhardy/Roll-Your-Own/rollyourown/commerce/utils/friendly_id.py/FriendlyID.__init__/original