authomatic/extras/gae/__init__.py
def get(cls, key, default=None):
        """
        Resembles the :meth:`dict.get` method.

        :returns:
            A configuration dictionary for specified provider.

        """

        # Query datastore.
        result = cls.query(cls.provider_name == key).get()

        if result:
            result_dict = result.to_dict()

            # Use NDBOpenIDStore by default
            result_dict['store'] = NDBOpenIDStore

            # Convert coma-separated values to list. Currently only scope is
            # csv.
            for i in ('scope', ):
                prop = result_dict.get(i)
                if prop:
                    result_dict[i] = [s.strip() for s in prop.split(',')]
                else:
                    result_dict[i] = None

            return result_dict
        else:
            return default
def get(cls, key, default=None):
        """
        Resembles the :meth:`dict.get` method.

        :returns:
            A configuration dictionary for specified provider.

        """

        # Query datastore.
        result = cls.query(cls.provider_name == key).get()

        if result:
            result_dict = result.to_dict()

            # Use NDBOpenIDStore by default
            result_dict['store'] = NDBOpenIDStore

            # Convert coma-separated values to list. Currently only scope is
            # csv.
            for i in ('scope', ):
                prop = result_dict.get(i)
                if prop:
                    result_dict[i] = [s.strip() for s in prop.split(',')]
                else:
                    result_dict[i] = None

            return result_dict
        else:
            return default
Resembles the :meth:`dict.get` method.

        :returns:
            A configuration dictionary for specified provider.