Gets a value from the config object, or return a default value if
        the parameter does not exist, like :py:meth:`dict.get` does.

def get(config, key, default=None):
        """Gets a value from the config object, or return a default value if
        the parameter does not exist, like :py:meth:`dict.get` does.
        """

        if hasattr(config, key):
            return getattr(config, key)
        else:
            return default