python-dbus-next
python-dbus-next copied to clipboard
Consider adding bus.get_interface() shortcut
Seems that the following pattern repeats frequently:
- Get introspection
- Get proxy object
- Get interface
Is it possible to have a shortcut for this? Something like:
Class MessageBus:
async def get_interface(self, name, path, interface):
introspection = await self.introspect(name, path)
proxy = bus.get_proxy_object(name, path, introspection)
return proxy.get_interface(interface)
Thanks!