def set_alphabet(self, alphabet):

        # Turn the alphabet into a set and sort it to prevent duplicates
        # and ensure reproducibility.
        new_alphabet = list(sorted(set(alphabet)))
        if len(new_alphabet) > 1:
            self._alphabet = new_alphabet
            self._alpha_len = len(self._alphabet)
        else:
            raise ValueError("Alphabet with more than "
                             "one unique symbols required.")
Set the alphabet to be used for new UUIDs.
dataset/ETHPy150Open stochastic-technologies/shortuuid/shortuuid/main.py/ShortUUID.set_alphabet