import pyudev

context = pyudev.Context()
monitor = pyudev.Monitor.from_netlink(context)
monitor.filter_by(subsystem="usb")

for device in iter(monitor.poll, None):
    if device.action == "add":
        print("{} connected".format(device))
