Skip to main content

IORegistry exploration library

Project description

ioregistry

Python library for IORegistry exploration.

Installation

python3 -m pip install -U ioregistry

Usage

See the following example as an example to query the associated USB-ethernet interface with a connected iDevice:

from ioregistry.exceptions import IORegistryException
from ioregistry.ioentry import get_io_services_by_type

for ethernet_interface_entry in get_io_services_by_type('IOEthernetInterface'):
    try:
        apple_usb_ncm_data = ethernet_interface_entry.get_parent_by_type('IOService', 'AppleUSBNCMData')
    except IORegistryException:
        continue

    if 'waitBsdStart' in apple_usb_ncm_data.properties:
        # RSD interface
        continue

    try:
        usb_host = ethernet_interface_entry.get_parent_by_type('IOService', 'IOUSBHostDevice')
    except IORegistryException:
        continue

    product_name = usb_host.properties['USB Product Name']
    usb_serial_number = usb_host.properties['USB Serial Number']
    print(product_name, usb_serial_number, ethernet_interface_entry.name)

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

ioregistry-0.0.2.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ioregistry-0.0.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file ioregistry-0.0.2.tar.gz.

File metadata

  • Download URL: ioregistry-0.0.2.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ioregistry-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a73ca59bf1d1d1f639c6f25cc2b9a3eb3ad346aa88d5a42203981196ac24ee81
MD5 5e570f1c66a4cbfe90c09c0695c83217
BLAKE2b-256 2ffd02149424098d5f38346e07188723d1c6e04fe0f65892318303930d78bce3

See more details on using hashes here.

File details

Details for the file ioregistry-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ioregistry-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ioregistry-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82b2064f24783434dc83043f45a2c960d081a372c37a7920a3a11068190bcd5f
MD5 f3af5bbf44f864bc251ace18242dab28
BLAKE2b-256 b925dbf35d12f6c4863c6747f9592231d25722dc393df75af39b37913f086a38

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page