We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 203459d commit 98a7138Copy full SHA for 98a7138
1 file changed
README.md
@@ -18,6 +18,21 @@ for hub in hubs:
18
print(f" Found port: {port}")
19
```
20
21
+## Create hub and enumerate attached ports
22
+```python
23
+import uhubctl
24
+
25
+hub = Hub("1-1", enumerate=True)
26
27
+# Iterate all ports
28
+for port in hub.ports:
29
+ print(f"Found port: {port}")
30
31
+# Get port by port number
32
+port_2 = hub.find_port(2)
33
+print(f"The status of port 2 is {port_2.status}")
34
+```
35
36
## Manually specify hub and port
37
38
```python
0 commit comments