def get_hooks(obj):
    """get registered hooks from object
    must try different casing and accessors because of
    tests and casing mode set on dynaconf.
    """
    attr = "_registered_hooks"
    for key in [attr, attr.upper()]:
        if hasattr(obj, key):
            return getattr(obj, key)
        elif isinstance(obj, dict) and key in obj:
            return obj[key]
        elif hasattr(obj, "_store") and key in obj._store:
            return obj._store[key]
    return {}
get registered hooks from object
    must try different casing and accessors because of
    tests and casing mode set on dynaconf.
    
dynaconf/hooking.py