try:
    from pkg_resources import working_set
except ImportError:
    pass
else:
    for entry_point in working_set.iter_entry_points(GROUP_NAME, method):
        func = entry_point.load(require=True)
break
Examples of entry_point usage