Skip to main content

Library to parse extended display identification data (EDID)

Project description

pyEDID

Build Status codecov PyPI PyPI - Python Version PyPI - Status PyPI - Downloads PyPI - License

Getting started

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

This project based on pyedid

EDID data format

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

Requirements

  • Python 3.6+
  • requests

Setup

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

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
edid.width # 53.0
edid.height # 30.0
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

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

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

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

Uploaded Source

Built Distribution

pyedid-1.0-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyedid-1.0.tar.gz
  • Upload date:
  • Size: 36.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pyedid-1.0.tar.gz
Algorithm Hash digest
SHA256 2ecc16b73cb6d6c8ab8d99e473ea1dc2697de9f27a7db60244a8f8bc8e72bea4
MD5 0e06455d9e808303fbfa038f11ba2222
BLAKE2b-256 35d1db3dcd9ab33053ad6518a9b32e0bffe7a970b982bbe2d0fe704f9eceeed8

See more details on using hashes here.

File details

Details for the file pyedid-1.0-py3-none-any.whl.

File metadata

  • Download URL: pyedid-1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pyedid-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cc0e455769e96916bde469d29a701a7aa387cb5030ab3f1f27ebec45a6adcbc
MD5 e99764c1346cc1e2f1f03375779a8f50
BLAKE2b-256 14cdf33d213b3c87c3cfc1b66f9cc587abc31ca1b0948f3281fee4077a0296dc

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