The Trezor model T uses webusb to communicate (see #38 (comment)). I believe Ledger Nano S supports U2F.
I'm not entirely clear on the differences between webusb and U2F.
I'm guessing trying and studying https://github.com/trezor/python-trezor would be a good place to start.