skillfed

screeninfo

Fetch location and size of physical screens.

screeninfo v0.8.1 12.7M downloads/30d#1,309 on PyPI244
Permissive license MIT AGING released

What it is and what it does

screeninfo is a cross-platform library that queries the operating system to enumerate connected monitors and retrieve their physical properties: position (x, y coordinates), resolution (width and height in pixels), physical dimensions (width_mm, height_mm), display name, and primary-display status. It abstracts away platform differences by providing a single `get_monitors()` function that works on Windows, Linux (X11 and experimental DRM), macOS, and Cygwin.

The library is lightweight and has low install friction—it ships as a pure-Python wheel on most platforms. Its runtime dependencies include Cython and pyobjc-framework-Cocoa (macOS only), plus the dataclasses backport for older Python versions. It supports Python 3.6.2 through 3.9 officially, though classifiers indicate 3.10 support. You can also force a specific driver (windows, cygwin, x11, osx) if auto-detection fails or you need to override the environment.

Use it for:

  • Detect monitor count and resolution to scale UI layouts or window positioning in desktop applications
  • Query physical screen dimensions (mm) for DPI-aware rendering or accessibility adjustments
  • Enumerate all connected displays to identify the primary monitor or arrange multi-monitor workflows
  • Force a specific display driver when running in emulated or non-standard environments like Cygwin
  • Retrieve monitor coordinates to place windows on specific screens in multi-display setups

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Detects and reports the location, dimensions, and physical properties of connected monitors across Windows, Linux, macOS, and Cygwin environments.

Yes, if you need cross-platform monitor detection for desktop or multi-display applications. The library is stable, permissively licensed, and has low install friction. However, maintenance is aging (last release 2022, no updates since August 2025)—verify that DRM support on Linux and compatibility with your target Python versions meet your needs before relying on it for production systems.

Install

screeninfo on PyPI

pip

pip install screeninfo

uv

uv add screeninfo

poetry

poetry add screeninfo

Installing screeninfo

Before you install

Low friction installation with a pure-Python wheel. Maintenance is aging—last release was in 2022 and the repository has not been updated since August 2025, though it remains active and unarchived with modest community engagement (244 stars).

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice in distributions.

Quickstart

pip install screeninfo

from screeninfo import get_monitors
for m in get_monitors():
    print(m)

Platform-specific: requires X11 libraries on Linux (Xinerama), AppKit on macOS (via pyobjc-framework-Cocoa), or native Windows APIs. DRM support on Linux is experimental.

Verify before relying

  • Whether DRM driver on Linux is stable enough for production use
  • Current compatibility with Python 3.10+ beyond stated support
  • Whether aging maintenance affects bug fixes for newer OS versions

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6.2,<4.0.0)
Install friction low — pure-Python wheel
Runtime dependencies 3 — dataclasses, Cython, pyobjc-framework-Cocoa
Maintenance aging — 1,435 days since the last release
Last repo commit
First released
Downloads 12,716,034/month — #1,309 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: screeninfo-0.8.1-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Desktop EnvironmentTopic :: System :: Operating SystemTyping :: Typed

Tags

monitor detectionscreen resolution querydisplay informationmulti-monitor setupphysical screen propertiesmonitor coordinatesdisplay enumeration
cross-platformdisplay-detectiondesktop-utilities

More Desktop Environment packages