Skip to main content

PyMonitors: a Python library to obtain info about available screens (monitors).

Project description

PyMonitors

A Python library to programatically get your monitor's resolution info.

It supports multiple strategies:

  • xrandr: Linux only, requires x11-xserver-utils to be installed.
  • appkit: MacOS only, requires pyobjc, AppKit, and cairo to be installed.
  • mswindows: Windows only, requires the Powershell to be installed.

Usage

from pymonitors import get_monitors


for monitor in get_monitors():
    width: int = monitor.width
    height: int = monitor.height

    print(f"Monitor {monitor.name} has resolution {width}x{height}.")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymonitors-1.0.2.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

pymonitors-1.0.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file pymonitors-1.0.2.tar.gz.

File metadata

  • Download URL: pymonitors-1.0.2.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pymonitors-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2569879ed2c74aa466e75de35814230bec25dff24e5c911390b6dde9467c5666
MD5 b6ae711f1ccddb0c479f0483c2aa9b46
BLAKE2b-256 4cd0606873446d83367fd49bbafce1e0927188fd080052dbcb54e214beaf5c67

See more details on using hashes here.

File details

Details for the file pymonitors-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pymonitors-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pymonitors-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ecd4e072d7f34ee0e32087776bc418b226e75a0a55e30eac38b19e0ff1d5ac9
MD5 236cb81ae9ec8e9052718a5e6f0c5361
BLAKE2b-256 83f2691b4f190993fa391249a96cdfafe8c2a4b3bfab73f0bec93d427aa362f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page