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.3.tar.gz
(21.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ioregistry-0.0.3.tar.gz.
File metadata
- Download URL: ioregistry-0.0.3.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b740587d22bc08dcb37861351ee759fb00b65bfad78c8acafd8558178829ac2a
|
|
| MD5 |
df3d1c67c1d854e731a921b84b0cc076
|
|
| BLAKE2b-256 |
4f4a0be29e5ca8c45a43ba16c2c6888c1d2ab36fdaa36505fe00e9d4cd1fe20a
|
File details
Details for the file ioregistry-0.0.3-py3-none-any.whl.
File metadata
- Download URL: ioregistry-0.0.3-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7750d652e714952a238b188048b5f918dd5526fd135befce21e88c9c786b466
|
|
| MD5 |
0d16a5aee0b621e31f6ccba5b30938e1
|
|
| BLAKE2b-256 |
85f578c4802b90c1ba002777e73572ae05067fb05fc3e8b52862f77e19b3c65a
|