Skip to content

Python package to parse USB Device Tree Viewer output to pydantic

License

Notifications You must be signed in to change notification settings

sandbox-pokhara/pyusb-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Python package to parse USB Device Tree Viewer output to pydantic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages