def get_dict_attr(obj, attr, default=None):
    for obj in [obj] + obj.__class__.mro():
        if attr in obj.__dict__:
            return obj.__dict__[attr]

    return default
Get attribute of the object without triggering its __getattr__.
dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tools.py/get_dict_attr