Skip to main content

uhid-freebsd

uhid-freebsd is a Python library to retrieve information on USB HID devices on FreeBSD (/dev/uhid*).

Installation

pkg install py38-uhid-freebsd
cd /usr/ports/devel/py-uid-freebsd
make install clean

Usage

from __future__ import print_function

import uhid_freebsd as uhid
import os

for dev in uhid.enumerate():
    print("Device:", dev["device"])
    print("  Path:", dev["path"])
    print("  VendorId: 0x%04x" % dev["vendor_id"])
    print("  ProductId: 0x%04x" % dev["product_id"])
    print("  ProductDesc:", dev["product_desc"])
    print("  SerialNumber:", dev["serial_number"])
    fd = os.open(dev["path"], os.O_RDONLY)
    out = uhid.get_report_data(fd, 3)
    os.close(fd)
    print("  ReportData: " +
          " ".join([("%02x" % (x)) for x in out]))

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

BSD 2-Clause

Metadata

Release files for uhid-freebsd 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uhid-freebsd 1.2.2
File Size Uploaded Provenance Actions
uhid-freebsd-1.2.2.tar.gz 4.5 kB Without provenance Details for uhid-freebsd-1.2.2.tar.gz

Release files / uhid-freebsd-1.2.2.tar.gz

Download URL uhid-freebsd-1.2.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3670374111e9cde795323992809c1299c95c46e96b9bd888c3b340a4e1e733bc
BLAKE2b-256 checksum
How to use checksums
3eff87c166a4e1eb9a7fb0a610295a1feeac114c5f4ebdfd17d586d85f783ec2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.37.0 CPython/3.6.9

Security for uhid-freebsd 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page