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