for loaded_module in list(sys.modules.values()):
    for module_attribute in dir(loaded_module):
        if getattr(loaded_module, module_attribute) is studied_module:
            yield loaded_module
How to know who is importing me in python?