# pyEDID
[](https://travis-ci.com/dd4e/pyedid)
[](https://codecov.io/gh/dd4e/pyedid)





## Getting started
This is a python library to parse extended display identification data (EDID).
This project based on [pyedid](https://github.com/jojonas/pyedid)
## EDID data format
The EDID data frame format is described in detail on the [Wikipedia](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) page.
## Requirements
- Python 3.6+
- requests
## Setup
```bash
pip3 install pyedid
```
## Features
- Parsing EDID data from hex or bytes
- Embedded PNP ID registry with dump/restore to CSV file
- Updatable PNP ID registry from www.uefi.org
## Docs
> ToDO
## Quickstart
### Parsing some hex EDID data with the default registry
```python
import pyedid
edid_hex = (
'00ffffffffffff000469982401010101'
'1e1b01031e351e78ea9265a655559f28'
'0d5054bfef00714f818081409500a940'
'b300d1c00101023a801871382d40582c'
'4500132b2100001e000000fd00324c1e'
'5311000a202020202020000000fc0056'
'533234380a20202020202020000000ff'
'0048374c4d51533132323136310a0000'
)
# returned Edid object, used the Default embedded registry
edid = pyedid.parse_edid(edid_hex)
edid.name # 'VS248'
edid.manufacturer # 'Ancor Communications Inc'
edid.serial # 'H7LMQS122161'
edid.year # 2017 (year of manufacture)
edid.week # 30 (week of manufacture)
edid.width # 53.0 cm
edid.height # 30.0 cm
edid.resolutions # list with resulutions (x, y, rate), ex (720, 400, 70.0)
edid... # some other EDID data
json_str = str(edid) # making JSON string object
```
### Getting EDID from `xrandr --verbose`
```python
from pyedid import get_edid_from_xrandr_verbose
from subprocess import check_output
# getting `xrandr --verbose` output
randr = check_output(['xrandr', '--verbose'])
# parsing xrandr outputs to a bytes edid's list
edids = get_edid_from_xrandr_verbose(randr)
# parsing edid
edid = pyedid.parse_edid(edids[0])
```
### Working with registry
```python
from pyedid import Registry, DEFAULT_REGISTRY
# making a registry object from www.uefi.org
r_web = Registry.from_web()
# dumping the default registry to csv file
DEFAULT_REGISTRY.to_csv('/path/to/csv.file')
# restoring registry from csv file
r_csv = Registry.from_csv('/path/to/csv.file')
```
## Licensing
See LICENSE
Raw data
{
"_id": null,
"home_page": "https://github.com/dd4e/pyedid",
"name": "pyedid",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "edid,xrandr,display,monitor",
"author": "Davydov Denis, Jonas Lieb",
"author_email": "dadmoscow@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ee/8f/67ad1955ca1afcd9f16af8377efe83aee8e162c1c333d4efa9813b1eb5b9/pyedid-1.0.3.tar.gz",
"platform": null,
"description": "# pyEDID\n\n[](https://travis-ci.com/dd4e/pyedid)\n[](https://codecov.io/gh/dd4e/pyedid)\n\n\n\n\n\n\n## Getting started\n\nThis is a python library to parse extended display identification data (EDID).\n\nThis project based on [pyedid](https://github.com/jojonas/pyedid)\n\n## EDID data format\n\nThe EDID data frame format is described in detail on the [Wikipedia](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) page.\n\n## Requirements\n\n- Python 3.6+\n- requests\n\n## Setup\n\n```bash\npip3 install pyedid\n```\n\n## Features\n\n- Parsing EDID data from hex or bytes\n- Embedded PNP ID registry with dump/restore to CSV file\n- Updatable PNP ID registry from www.uefi.org\n\n## Docs\n\n> ToDO\n\n## Quickstart\n\n### Parsing some hex EDID data with the default registry\n\n```python\nimport pyedid\n\nedid_hex = (\n '00ffffffffffff000469982401010101'\n '1e1b01031e351e78ea9265a655559f28'\n '0d5054bfef00714f818081409500a940'\n 'b300d1c00101023a801871382d40582c'\n '4500132b2100001e000000fd00324c1e'\n '5311000a202020202020000000fc0056'\n '533234380a20202020202020000000ff'\n '0048374c4d51533132323136310a0000'\n)\n\n# returned Edid object, used the Default embedded registry\nedid = pyedid.parse_edid(edid_hex)\n\nedid.name # 'VS248'\nedid.manufacturer # 'Ancor Communications Inc'\nedid.serial # 'H7LMQS122161'\nedid.year # 2017 (year of manufacture)\nedid.week # 30 (week of manufacture)\nedid.width # 53.0 cm\nedid.height # 30.0 cm\nedid.resolutions # list with resulutions (x, y, rate), ex (720, 400, 70.0)\nedid... # some other EDID data\n\njson_str = str(edid) # making JSON string object\n```\n\n### Getting EDID from `xrandr --verbose`\n\n```python\nfrom pyedid import get_edid_from_xrandr_verbose\nfrom subprocess import check_output\n\n# getting `xrandr --verbose` output\nrandr = check_output(['xrandr', '--verbose'])\n\n# parsing xrandr outputs to a bytes edid's list\nedids = get_edid_from_xrandr_verbose(randr)\n\n# parsing edid\nedid = pyedid.parse_edid(edids[0])\n```\n\n### Working with registry\n\n```python\nfrom pyedid import Registry, DEFAULT_REGISTRY\n\n# making a registry object from www.uefi.org\nr_web = Registry.from_web()\n\n# dumping the default registry to csv file\nDEFAULT_REGISTRY.to_csv('/path/to/csv.file')\n\n# restoring registry from csv file\nr_csv = Registry.from_csv('/path/to/csv.file')\n```\n\n## Licensing\n\nSee LICENSE\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library to parse extended display identification data (EDID)",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/dd4e/pyedid"
},
"split_keywords": [
"edid",
"xrandr",
"display",
"monitor"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f1ba0f26432b195a09de22ed8eadde1c556e25e93ece65f3e40f6cf3ccbf4224",
"md5": "2873a13485eeb2b3e386a1e383d03a81",
"sha256": "aa8bd3ce30b4813cbab0c111d4fc2dee1484d7f951b2b84002284f83481b7a3c"
},
"downloads": -1,
"filename": "pyedid-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2873a13485eeb2b3e386a1e383d03a81",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 36258,
"upload_time": "2023-08-01T09:17:28",
"upload_time_iso_8601": "2023-08-01T09:17:28.675143Z",
"url": "https://files.pythonhosted.org/packages/f1/ba/0f26432b195a09de22ed8eadde1c556e25e93ece65f3e40f6cf3ccbf4224/pyedid-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ee8f67ad1955ca1afcd9f16af8377efe83aee8e162c1c333d4efa9813b1eb5b9",
"md5": "e2727736fa07f4bf031d5a96a63413ab",
"sha256": "e61b8ef7b6806ec536ea971bf650e3470f6a9cdae994d6f50d2d97c3f8f1b8f4"
},
"downloads": -1,
"filename": "pyedid-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "e2727736fa07f4bf031d5a96a63413ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 37236,
"upload_time": "2023-08-01T09:17:30",
"upload_time_iso_8601": "2023-08-01T09:17:30.182000Z",
"url": "https://files.pythonhosted.org/packages/ee/8f/67ad1955ca1afcd9f16af8377efe83aee8e162c1c333d4efa9813b1eb5b9/pyedid-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-01 09:17:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dd4e",
"github_project": "pyedid",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"lcname": "pyedid"
}