screeninfo


Namescreeninfo JSON
Version 0.8.1 PyPI version JSON
download
home_pagehttps://github.com/rr-/screeninfo
SummaryFetch location and size of physical screens.
upload_time2022-09-09 11:35:23
maintainer
docs_urlNone
authorMarcin Kurczewski
requires_python>=3.6.2,<4.0.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            screeninfo
----------

[![Build](https://github.com/rr-/screeninfo/actions/workflows/build.yml/badge.svg)](https://github.com/rr-/screeninfo/actions/workflows/build.yml)

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

```python
from screeninfo import get_monitors
for m in get_monitors():
    print(str(m))
```

**Output**:

```python console
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:

```python
from screeninfo import get_monitors, Enumerator
for m in get_monitors(Enumerator.OSX):
    print(str(m))
```

Available drivers: `windows`, `cygwin`, `x11`, `osx`.

# Contributing


```sh
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](https://python-poetry.org/) for packaging,
install instructions at [poetry#installation](https://python-poetry.org/docs/#installation)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rr-/screeninfo",
    "name": "screeninfo",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6.2,<4.0.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Marcin Kurczewski",
    "author_email": "rr-@sakuya.pl",
    "download_url": "https://files.pythonhosted.org/packages/ec/bb/e69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27/screeninfo-0.8.1.tar.gz",
    "platform": null,
    "description": "screeninfo\n----------\n\n[![Build](https://github.com/rr-/screeninfo/actions/workflows/build.yml/badge.svg)](https://github.com/rr-/screeninfo/actions/workflows/build.yml)\n\nFetch location and size of physical screens.\n\n### Supported environments\n\n- MS Windows\n- MS Windows: Cygwin\n- GNU/Linux: X11 (through Xinerama)\n- GNU/Linux: DRM (experimental)\n- OSX: (through AppKit)\n\nI don't plan on testing OSX or other environments myself. For this reason,\nI strongly encourage pull requests.\n\n### Installation\n\n```\npip install screeninfo\n```\n\n### Usage\n\n```python\nfrom screeninfo import get_monitors\nfor m in get_monitors():\n    print(str(m))\n```\n\n**Output**:\n\n```python console\nMonitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False)\nMonitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True)\n```\n\n### Forcing environment\n\nIn some cases (emulating X server on Cygwin etc.) you might want to specify the\ndriver directly. You can do so by passing extra parameter to `get_monitors()`\nlike this:\n\n```python\nfrom screeninfo import get_monitors, Enumerator\nfor m in get_monitors(Enumerator.OSX):\n    print(str(m))\n```\n\nAvailable drivers: `windows`, `cygwin`, `x11`, `osx`.\n\n# Contributing\n\n\n```sh\ngit clone https://github.com/rr-/screeninfo.git # clone this repo\ncd screeninfo\npoetry install # to install the local venv\npoetry run pre-commit install # to setup pre-commit hooks\npoetry shell # to enter the venv\n```\n\nThis project uses [poetry](https://python-poetry.org/) for packaging,\ninstall instructions at [poetry#installation](https://python-poetry.org/docs/#installation)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fetch location and size of physical screens.",
    "version": "0.8.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "7ce6d7c072b6270db27ba0648d6972ab",
                "sha256": "e97d6b173856edcfa3bd282f81deb528188aff14b11ec3e195584e7641be733c"
            },
            "downloads": -1,
            "filename": "screeninfo-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7ce6d7c072b6270db27ba0648d6972ab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6.2,<4.0.0",
            "size": 12907,
            "upload_time": "2022-09-09T11:35:21",
            "upload_time_iso_8601": "2022-09-09T11:35:21.351435Z",
            "url": "https://files.pythonhosted.org/packages/6e/bf/c5205d480307bef660e56544b9e3d7ff687da776abb30c9cb3f330887570/screeninfo-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "d50a6278a42de0594c4abd078c146b74",
                "sha256": "9983076bcc7e34402a1a9e4d7dabf3729411fd2abb3f3b4be7eba73519cd2ed1"
            },
            "downloads": -1,
            "filename": "screeninfo-0.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d50a6278a42de0594c4abd078c146b74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.2,<4.0.0",
            "size": 10666,
            "upload_time": "2022-09-09T11:35:23",
            "upload_time_iso_8601": "2022-09-09T11:35:23.419552Z",
            "url": "https://files.pythonhosted.org/packages/ec/bb/e69e5e628d43f118e0af4fc063c20058faa8635c95a1296764acc8167e27/screeninfo-0.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-09-09 11:35:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "rr-",
    "github_project": "screeninfo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "screeninfo"
}
        
Elapsed time: 0.02446s