A Python wrapper for Quartz Display Services.
Supported Python versions are 3.10 and 3.11.
pip install python-qds
You can use low-level C API bindings from the qds.api
module.
>>> import qds.api
>>> qds.api.get_online_display_list()
[1]
>>> qds.api.is_display_active(1)
True
>>> qds.api.get_display_pixels_wide(1)
1440
Or use the high-level qds.display.Display
class being a convenience wrapper for
the low-level functions.
>>> from qds.display import Display
>>> d = Display.from_id(1)
>>> d.is_online
True
>>> d.width
1440