Skip to main content

Python package to parse USB Device Tree Viewer output to pydantic

Project description

pyusb-tree

Python package to parse USB Device Tree Viewer (https://www.uwe-sieber.de/usbtreeview_e.html) output to pydantic.

Limitations

  • Only supports windows
  • Extracting data from USB Device Tree Viewer is slow

Installation

You can install the package via pip:

pip install pyusb-tree

Usage

from pyusb_tree import get_devices

data = get_devices()

Output

Node(
    name="JOHN-PC",
    attributes={...},
    children=[
        Node(
            name="Intel(R) USB 3.0 eXtensible Host Controller",
            attributes={...},
            children=[
                Node(
                    name="USB Root Hub (USB 3.0)",
                    attributes={...},
                    children=[
                        Node(
                            name="[Port1]",
                            attributes={...},
                            children=[],
                        ),
                        Node(
                            name="[Port2]",
                            attributes={...},
                            children=[],
                        ),
                        Node(
                            name="[Port3]",
                            attributes={...},
                            children=[],
                        ),
                    ],
                ),
            ],
        ),
    ],
)

License

This project is licensed under the terms of the MIT 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

pyusb_tree-1.0.1.tar.gz (452.4 kB view hashes)

Uploaded Source

Built Distribution

pyusb_tree-1.0.1-py3-none-any.whl (452.6 kB view hashes)

Uploaded Python 3

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