@classmethod
def from_dict(cls, source):
    """
        Load / create a TOTP object from a dictionary
        (as generated by :meth:`to_dict`)

        :param source:
            dict containing serialized TOTP key & configuration.

        :raises ValueError:
            If the key has been encrypted, but the application secret isn't available;
            or if the dict cannot be recognized, parsed, or decoded.

            See :meth:`TOTP.using()` for how to configure application secrets.

        :returns:
            A :class:`TOTP` instance.

        .. seealso:: :ref:`totp-storing-instances` tutorial for a usage example
        """
    if not isinstance(source, dict) or 'type' not in source:
        raise cls._dict_parse_error('unrecognized format')
    return cls(**cls._adapt_dict_kwds(**source))
