We could make it easier to use by turning it into a ContextManager, which also clearly documents that it needs to be closed. This could be done either by adding an argument to the existing method, or by adding a new method.
This also applies to other methods, including some related to rendering.
For example,
omero.cilent.submit()
returns a handle that needs to be closed to avoid a resource leak: https://github.com/ome/omero-py/blob/c62def8fbb33bd89827623f7c0e1f69e88d07182/src/omero/clients.py#L994-L1001We could make it easier to use by turning it into a ContextManager, which also clearly documents that it needs to be closed. This could be done either by adding an argument to the existing method, or by adding a new method.
This also applies to other methods, including some related to rendering.