Products & Barcodes¶
Look up products by EAN barcode and generate QR codes.
ProductsClient
¶
Sub-client for barcode / QR-code product lookup endpoints.
Accessed via HomeboxClient.products.
Source code in homebox/client.py
__init__
¶
search_ean_from_barcode
¶
Look up product information by EAN/barcode string.
Queries external product databases and returns matching product details that can be used to pre-fill a new item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
str | None
|
EAN-13 or other barcode string to look up. |
None
|
Returns:
| Type | Description |
|---|---|
list[BarcodeProduct]
|
list[BarcodeProduct]: Matching products from one or more search
engines. Each result may include manufacturer, model number,
notes, an image, and a pre-populated :class: |
Source code in homebox/client.py
create_qr_code
¶
Generate a QR code image for an arbitrary string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
str | None
|
The string to encode in the QR code (e.g. a URL or asset ID). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
QR code image content (SVG or PNG depending on server config). |