| Server IP : 178.212.43.201 / Your IP : 10.100.0.33 Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k System : Linux spa0007.srv.paxillus.pl 5.4.17-2136.355.3.1.el8uek.x86_64 #3 SMP Sat May 9 17:11:55 PDT 2026 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/usr/share/doc/python3-hwdata/ |
Upload File : |
# python-hwdata
Provides python interface to database stored in [hwdata](https://fedorahosted.org/hwdata/) package.
It allows you to get human readable description of USB and PCI devices.
## Example
```
#!/usr/bin/python
from hwdata import PCI, USB, PNP
# for obtaining real id of your devices you can use package python-gudev
pci_vendor_id = '0e11'
pci_device_id = 'b01e'
usb_vendor_id = '03f0'
usb_device_id = '1f12'
pci = PCI()
print("Vendor: %s" % pci.get_vendor(pci_vendor_id))
print("Device: %s" % pci.get_device(pci_vendor_id, pci_device_id))
usb = USB()
print("Vendor: %s" % usb.get_vendor(usb_vendor_id))
print("Device: %s" % usb.get_device(usb_vendor_id, usb_device_id))
pnp = PNP()
print("Vendor: %s" $ pnp.get_vendor('AAA'))
```
## Upstream
https://github.com/xsuchy/python-hwdata
## Build package
When you run:
```
tito build --tgz
```
you will get latest tar.gz file.
When you run:
```
tito build --rpm
```
you will get latest rpm package.
## Distributions
This package is present in [Fedora and EPEL](http://koji.fedoraproject.org/koji/packageinfo?packageID=10271). You should be able to just `dnf install python-hwdata`.