Skip to main content

This is a python library to parse extended display identification data (EDID)

Project description

pyEDID

This is a python library to parse extended display identification data (EDID)

EDID data format

The EDID data frame format is described in detail on its Wikipedia page.

Getting started

Setup

From pypi

>>> pip install pyedid

or from github

>>> git clone https://github.com/dadmoscow/pyedid
>>> python pyedid/setup.py install

Features

  • Receive and decrypt EDID data
  • Online converting manufacturer id, dumping registry to local csv
  • Works as a shell utility
  • Without third-party dependencies

Use

As a library

from pyedid.edid import Edid
from pyedid.helpers.edid_helper import EdidHelper
from pyedid.helpers.registry import Registry

#### Step 1: loading registry
# load pnp registry from http://www.uefi.org/pnp_id_list
registry = Registry.from_web()

# or loading from local csv file
registry = Registry.from_csv('/tmp/foo.csv')

# load from web and dump to csv
registry = Registry.from_web().to_csv('/tmp/bar.csv')

# only update
Registry.from_web().to_csv('/tmp/bar.csv')

#### Step 2: loading edid data

# loading list with edid data
edid_bs = EdidHelper.get_edids()[0]

# convert exist edid hex string from xrandr
edid_bs = EdidHelper.hex2bytes("hex string from xrandr...")

#### Step 3: create instance

# create Edid instance for fisrt edid data
edid = Edid(edid_bs, registry)
print(edid)

# Edid(
# 	dpms_activeoff=True,
# 	dpms_standby=True,
# 	dpms_suspend=True,
# 	edid_version=1.3,
# 	gamma=2.2,
# 	height=30.0,
# 	manufacturer=Ancor Communications Inc,
# 	manufacturer_id=1129,
# 	name=VS248,
# 	product=38948,
# 	raw=b'\x00\xff\xff\xff\xff\xff\xff\x00\x04i\x98$\x01\x01\x01\x01\x1e\x1b\x01\x03\x1e5\x1ex\xea\x92e\xa6UU\x9f(\rPT\xbf\xef\x00qO\x81\x80\x81@\x95\x00\xa9@\xb3\x00\xd1\xc0\x01\x01\x02:\x80\x18q8-@X,E\x00\x13+!\x00\x00\x1e\x00\x00\x00\xfd\x002L\x1eS\x11\x00\n      \x00\x00\x00\xfc\x00VS248\n       \x00\x00\x00\xff\x00H7LMQS122161\n\x00\x00',
# 	resolutions=[(720, 400, 70.0), (720, 400, 88.0), (640, 480, 60.0), (640, 480, 67.0), (640, 480, 72.0), (640, 480, 75.0), (800, 600, 56.0), (800, 600, 60.0), (800, 600, 70.0), (800, 600, 75.0), (832, 624, 75.0), (1024, 768, 87.0), (1024, 768, 60.0), (1024, 768, 72.0), (1024, 768, 75.0), (1152, 864, 75.0), (1280, 1024, 60.0), (1280, 960, 60.0), (1440, 900, 60.0), (1600, 1200, 60.0), (1680, 1050, 60.0), (1920, 1080, 60.0)],
# 	serial=H7LMQS123181,
# 	type=digital,
# 	width=53.0,
# 	year=2017
# )

As a system utility

>>> pyedid

# Loading registry from web...
# Done!

# Edid(
# 	dpms_activeoff=True,
# 	dpms_standby=True,
# 	dpms_suspend=True,
# 	edid_version=1.3,
# 	gamma=2.2,
# 	height=30.0,
# 	manufacturer=Ancor Communications Inc,
# 	manufacturer_id=1129,
# 	name=VS248,
# 	product=38948,
# 	raw=b'\x00\xff\xff\xff\xff\xff\xff\x00\x04i\x98$\x01\x01\x01\x01\x1e\x1b\x01\x03\x1e5\x1ex\xea\x92e\xa6UU\x9f(\rPT\xbf\xef\x00qO\x81\x80\x81@\x95\x00\xa9@\xb3\x00\xd1\xc0\x01\x01\x02:\x80\x18q8-@X,E\x00\x13+!\x00\x00\x1e\x00\x00\x00\xfd\x002L\x1eS\x11\x00\n      \x00\x00\x00\xfc\x00VS248\n       \x00\x00\x00\xff\x00H7LMQS122161\n\x00\x00',
# 	resolutions=[(720, 400, 70.0), (720, 400, 88.0), (640, 480, 60.0), (640, 480, 67.0), (640, 480, 72.0), (640, 480, 75.0), (800, 600, 56.0), (800, 600, 60.0), (800, 600, 70.0), (800, 600, 75.0), (832, 624, 75.0), (1024, 768, 87.0), (1024, 768, 60.0), (1024, 768, 72.0), (1024, 768, 75.0), (1152, 864, 75.0), (1280, 1024, 60.0), (1280, 960, 60.0), (1440, 900, 60.0), (1600, 1200, 60.0), (1680, 1050, 60.0), (1920, 1080, 60.0)],
# 	serial=H7LMQS123181,
# 	type=digital,
# 	width=53.0,
# 	year=2017
# )

Licensing

See LICENSE

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

pyedid-0.1.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file pyedid-0.1.tar.gz.

File metadata

  • Download URL: pyedid-0.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for pyedid-0.1.tar.gz
Algorithm Hash digest
SHA256 bda39542cd61af769cb7a748800b50bbab76ffa211e4b82dc9f2036b2367e504
MD5 c7aa3d0be07063e872b48340ff5eb069
BLAKE2b-256 efede11c5c73a3cbc257c914c0fb0b80c86de54a8f6f408618f310ed31efff6e

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