I’ve been using the omd.py for a few years now, but I added some functionality to list all the hostgroups and their members- which is really helpful with some of my playbooks.
I haven’t seen anything in the web API that can help with this. get_all_hostgroups just returns the hostgroup names.