Python device discovery

I have Digi connectport x2 ZB Ethernet and I want to make a program in python. This program have to discover the devices in the ethernet LAN. It has to do the same as the tool ‘Digi Device Discovery’ but in python.