screeninfo
Fetch location and size of physical screens.
Supported environments
- MS Windows
- MS Windows: Cygwin
- GNU/Linux: X11 (through Xinerama)
- GNU/Linux: DRM (experimental)
- OSX: (through AppKit)
I don't plan on testing OSX or other environments myself. For this reason, I strongly encourage pull requests.
Installation
pip install screeninfo
Usage
from screeninfo import get_monitors
for m in get_monitors():
print(str(m))
Output:
Monitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False)
Monitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True)
Forcing environment
In some cases (emulating X server on Cygwin etc.) you might want to specify the
driver directly. You can do so by passing extra parameter to get_monitors()
like this:
from screeninfo import get_monitors, Enumerator
for m in get_monitors(Enumerator.OSX):
print(str(m))
Available drivers: windows, cygwin, x11, osx.
Contributing
git clone https://github.com/rr-/screeninfo.git # clone this repo
cd screeninfo
poetry install # to install the local venv
poetry run pre-commit install # to setup pre-commit hooks
poetry shell # to enter the venv
This project uses poetry for packaging, install instructions at poetry#installation
Metadata
Release files for screeninfo 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| screeninfo-0.8.1.tar.gz | 10.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| screeninfo-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / screeninfo-0.8.1.tar.gz
| Download URL | screeninfo-0.8.1.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9983076bcc7e34402a1a9e4d7dabf3729411fd2abb3f3b4be7eba73519cd2ed1
|
|
BLAKE2b-256 checksum How to use checksums |
ecbbe69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.5 Linux/5.18.15-arch1-1
|
Release files / screeninfo-0.8.1-py3-none-any.whl
| Download URL | screeninfo-0.8.1-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e97d6b173856edcfa3bd282f81deb528188aff14b11ec3e195584e7641be733c
|
|
BLAKE2b-256 checksum How to use checksums |
6ebfc5205d480307bef660e56544b9e3d7ff687da776abb30c9cb3f330887570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.5 Linux/5.18.15-arch1-1
|
Security for screeninfo 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.