Skip to main content

A cross-platform tool to monitor and inspect USB devices connected to the host system.

Project description

USB Inspector

Coverage

Overview

A simple package that leverages pyusb and allows you to lookup USB vendor and device IDs and get back a human readable vendor and device name. It includes ability to manually update the USB DB without installing a new version of usb-inspector.

Installation

python3 -m pip install usb-inspector

IMPORTANT: On Windows ensure you have libusb-1.0.dll in C:\Windows\System32 or you will get a NoBackendError. You can get them from here.

Example Usage

Command Line:

usb-inspector lookup --vendor-id 1A40
usb-inspector lookup --vendor-id 1A40 --device-id 0801

# To manually update the USB DB
usb-inspector delete-data
usb-inspector update-db
from usb_inspector.monitor import USBDeviceMonitor

usb_monitor = USBDeviceMonitor(poll_interval=1.0)
usb_monitor.monitor()
# Do stuff
...
usb_monitor.stop()

Issues

If you experience any issues, please create an issue on Bitbucket.

Development

To get a list of all commands with descriptions simply run make.

make env
make pip_install_editable

Testing

make pytest
make coverage
make open_coverage

History

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

0.1.4 (2025-11-05)

  • Added last_seen timestamp for each device.

0.1.4 (2025-10-31)

  • update-db cli command only adds new Vendors and Devices to the existing DB rather than requiring deletion and recreation of the DB.
  • Track which devices are connected/disconnected.

0.1.2 (2025-10-30)

  • Fix lookup error

0.1.1 (2025-10-30)

  • Added start as an alias for monitor.

0.1.0 (2025-10-30)

  • First release

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

usb_inspector-0.1.4.tar.gz (269.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usb_inspector-0.1.4-py3-none-any.whl (267.8 kB view details)

Uploaded Python 3

File details

Details for the file usb_inspector-0.1.4.tar.gz.

File metadata

  • Download URL: usb_inspector-0.1.4.tar.gz
  • Upload date:
  • Size: 269.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for usb_inspector-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3d231fba9a1661cb553656a4b945d1348bf9e522b96dc07ca71bea0d812d155e
MD5 0d0d94d5dfd44ddaf4da56cc705679c6
BLAKE2b-256 74d13417eeeb2cdcead08355e6b0e05e02b6ff15bcfdb17fd667a11e1d3f14e0

See more details on using hashes here.

File details

Details for the file usb_inspector-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: usb_inspector-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 267.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for usb_inspector-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 77078aad637773642bd9dd673dea3ff0721b249c9ee960618f98d9d47244c52f
MD5 1bfee0d6e1631fa100581cf959a44686
BLAKE2b-256 0e2499d05de0ad3c3cba94aeb9d7bb849a7fd9e1cd825ad0587d95e5d9245bdc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page