Metadata-Version: 2.4
Name: labeljetty
Version: 0.3.0
Summary: Network-accessible printing for USB TSPL thermal label printers (library + REST API + web UI).
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.124.0
Requires-Dist: getenv>=0.2.0
Requires-Dist: getversion>=1.0.2
Requires-Dist: itsdangerous>=2.2.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: pillow>=11.3.0
Requires-Dist: psutil>=7.1.3
Requires-Dist: pydantic-settings>=2.12.0
Requires-Dist: pypdfium2>=4.30.0
Requires-Dist: pyserial>=3.5
Requires-Dist: python-barcode>=0.15.1
Requires-Dist: python-multipart>=0.0.20
Requires-Dist: pyusb>=1.3.1
Requires-Dist: segno>=1.6.0
Requires-Dist: sqlmodel>=0.0.27
Requires-Dist: uvicorn>=0.38.0
Description-Content-Type: text/markdown

# 🏷️ LabelJetty

**Turn a cheap, USB-only TSPL thermal label printer into a smart, network-accessible label
printer** - drive it from your phone, desktop, or another machine over your LAN. It talks to the
printer **directly over USB** (no CUPS, no vendor driver) and gives you a mobile-first web UI, a
REST API, and a Python library for printing PNGs, PDFs, text, markdown, barcodes and QR codes.
Optional, self-contained [Homebox](https://github.com/sysadminsmedia/homebox) integration is
built in.

## Install

```sh
pip install labeljetty
# or, with uv:
uv tool install labeljetty
```

This gives you three commands:

- `labeljetty` - runs the service (REST API + web UI + background print worker)
- `labeljetty-testbench` - drives the printer library directly (real device or dry-run)
- `labeljetty-hash-password` - generates a password hash for a login user

You need **Python 3.11+**, **libusb**, and a USB **TSPL** printer. Set at least `PRINTER_USB`
(e.g. `PRINTER_USB=vid:2d37:pid:62de`, found via `lsusb`) in a `.env` or the environment, then
run `labeljetty` and open **http://localhost:8888/**. The
[Setup guide](https://github.com/motey/LabelJetty/blob/main/docs/setup.md) covers the printer,
the udev rule, and verifying your first label.

> Prefer Docker? The image is [`motey/labeljetty`](https://hub.docker.com/r/motey/labeljetty).

## Heads-up

- **No authentication by default** - fine on a trusted home LAN, but turn on `AUTH_MODE=protected`
  before exposing it to an untrusted network.
- **Reference hardware is a Vretti 420B** (Poskey-class TSPL, ~203 dpi). It should work with any
  USB TSPL printer; feedback/PRs for other models are welcome.

## More information

Full docs, the configuration reference, authentication, the REST API, printer/udev setup, and
Homebox integration live on **GitHub: https://github.com/motey/LabelJetty**
