Registry / devops / pymonctl

pymonctl

JSON →
library0.92pypypi✓ verified 88d ago

Cross-Platform toolkit to get info on and control monitors connected to the system. Version 0.92 supports Windows, macOS, and Linux (X11; partial Wayland). Release cadence is irregular.

pip install pymonctl
INSTALL
IMPORT
SIG · PYMONCTL
P
pymonctl
devopspythonv0.92
Install
1.9s avg
Import
—
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.92 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Monitor
✓ from pymonctl import Monitor
✗ from pymonctl.monitor import Monitor
Monitor is exposed at package level, not in submodules.
pymonctl
✓ import pymonctl
Module-level access for functions like getAllMonitors().

List all monitors and identify the primary monitor.

import pymonctl monitors = pymonctl.getAllMonitors() for m in monitors: print(m.name, m.width, m.height) # Get primary monitor primary = pymonctl.getPrimaryMonitor() print(f"Primary: {primary.name}")
monctl --version
Debug
Known issues
gotchaOn Linux, the library may crash in Wayland due to missing support. It may also freeze if invoked with a fake ':1' display.
fix
Use only on X11 sessions. Disable Wayland or run under XWayland.
affects: all
gotchaThe watchdog feature can freeze randomly on Linux due to screen_resources and get_output_info calls.
fix
Avoid using the watchdog on Linux or disable it (default is off). Upgrade to 0.92 may improve but not eliminate issue.
affects: <=0.92
breakingIn version 0.6, findMonitors() and findMonitorsInfo() were renamed to findMonitorsAtPoint() and findMonitorsAtPointInfo().
fix
Use new function names. Check deprecation warnings.
affects: <0.6
deprecatedDirect imports from submodules like 'pymonctl.monitor' are internal and may break.
fix
Always import from 'pymonctl' package level.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pymonctl'
Library not installed.
fix
Run 'pip install pymonctl'.
AttributeError: module 'pymonctl' has no attribute 'Monitor'
Importing from submodule instead of package.
fix
Use 'from pymonctl import Monitor'.
Upgrade
Version history
0.92latest on PyPI · released Apr 22, 2024
Audit
Dependencies
typing_extensionsrequiredRuntime dependency for typing support
Agent activity
11 hits · last 30 days
node
10
Resources
pymonctl — pip install pymonctl · libregistry