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.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymonitors-1.0.1.tar.gz
  • Upload date:
  • Size: 18.0 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.1.tar.gz
Algorithm Hash digest
SHA256 b02662cb40be66d81d3af7d19e1063fede5e29b120f2348890a7bb185aca3bd3
MD5 0e6c6d8111bcb30c1287a0b7ee3a3bb0
BLAKE2b-256 cb0ff5e2f9b995a61ee6d40c8f33f80b005f329edd9d4fc6330ffebf1780db38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymonitors-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10802236c14ebc14624a27f3157ec7c6c5a918c6890f9118ccd3712feae93e01
MD5 47011216568c3c020246bc142fcd00ab
BLAKE2b-256 4e1f668b782f0305aa839a0448be6958027b7168e79c3ef87250b83848671634

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