itchcraft.device ================ .. py:module:: itchcraft.device .. autoapi-nested-parse:: Base class for devices Attributes ---------- .. autoapisummary:: itchcraft.device.BiteHealerMetadata Classes ------- .. autoapisummary:: itchcraft.device.SupportedBiteHealerMetadata itchcraft.device.UnsupportedBiteHealerMetadata Functions --------- .. autoapisummary:: itchcraft.device.from_usb_device Module Contents --------------- .. py:class:: SupportedBiteHealerMetadata Device metadata for a supported bite healer connected to the host but not necessarily activated. Clients can query information from the bite healer and open a connection. .. py:attribute:: usb_product_name :type: Optional[str] Product name of the backing USB device. .. py:attribute:: serial_number :type: Optional[str] Serial number of the backing USB device. .. py:attribute:: connection_supplier :type: collections.abc.Callable[[], contextlib.AbstractContextManager[itchcraft.types.BiteHealer]] Callable that connects to the bite healer. .. py:attribute:: support_statement :type: itchcraft.support.SupportStatement Details about the support status for this bite healer. .. py:method:: connect() Connects to the device. .. py:property:: vendor_name :type: str Canonical vendor name from Itchcraft’s point of view. .. py:property:: product_name :type: str Canonical product name from Itchcraft’s point of view. .. py:property:: supported :type: bool Whether Itchcraft supports this device. .. py:class:: UnsupportedBiteHealerMetadata Device metadata for an unsupported bite healer connected to the host. Clients can query information from the bite healer. .. py:attribute:: usb_product_name :type: Optional[str] Product name of the backing USB device. .. py:attribute:: serial_number :type: Optional[str] Serial number of the backing USB device. .. py:attribute:: support_statement :type: itchcraft.support.SupportStatement Details about the support status for this bite healer. .. py:property:: vendor_name :type: str Canonical vendor name from Itchcraft’s point of view. .. py:property:: product_name :type: str Canonical product name from Itchcraft’s point of view. .. py:property:: supported :type: bool Whether Itchcraft supports this device. .. py:data:: BiteHealerMetadata .. py:function:: from_usb_device(usb_device, support_statement) Creates a metadata object from a USB device. :param usb_device: the PyUSB device to be queried for metadata. :param support_statement: Describes the level of support that Itchcraft offers for `usb_device`. :return: a metadata object that unifies info from both the PyUSB device and `support_statement`.