We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 052c557 commit b51e4eeCopy full SHA for b51e4ee
1 file changed
README.md
@@ -60,6 +60,27 @@ print("Get port 1-1.1 status")
60
print(port.status)
61
```
62
63
+## Device details
64
+
65
+```python
66
+import uhubctl
67
68
+hubs = uhubctl.discover_hubs()
69
70
+for hub in hubs:
71
+ print(f"Found hub: {hub}")
72
73
+ for port in hub.ports:
74
+ print(f" Found port: {port}")
75
76
+ # You can use the optional argument `cached_results=False` for each of
77
+ # these 3 methods in order to invalidate the internal cache,
78
+ # which is used for performance reasons
79
+ print(f" Description: {port.description()}")
80
+ print(f" Vendor ID: {port.vendor_id()}")
81
+ print(f" Product ID: {port.product_id()}")
82
+```
83
84
# FAQ
85
86
### How can I specify the path to ´uhubctl´
0 commit comments