Skip to main content

qltool 0.2.4

Tool to print labels with Brother QL-700/QL-570 label printer

A wrapper around the excellent ql570.c by Asbjørn Sloth Tønnesen, Marc Juul and Luca Zimmermann.

Features

  • Print text labels (1-3 lines)
  • Print QR codes with text
  • Print banners (text along paper length)
  • Custom font sizes
  • MQTT client for remote printing
  • Preview before printing

Installation

Using uv (recommended):

uv pip install -e .

Or with pip:

pip3 install qltool

Usage

Standard Label Print

Print 1-3 lines of text:

# Preview only
uv run src/qltool/main.py "Line 1" "Line 2" "Line 3" --font-size 40

# Print with specific font size
uv run src/qltool/main.py "Hello World" "Second line" -p --font-size 55

QR Code Labels

# Generate and print QR code with text
uv run src/qltool/main.py "Item: 12345" "Location: Office" -q -p

# Use existing QR image
uv run src/qltool/main.py "Scan me" --qr /path/to/qrcode.png -p

Banner Mode (Text along paper length)

# Preview banner
uv run src/qltool/main.py "Long text banner" --banner --font-size 40

# Print banner
uv run src/qltool/main.py "STS Chvojkovice-Brod" --banner --font-size 40 -p

Command Options

  • -p, --print - Send to printer (without this, shows preview)
  • -q, --qr - Generate QR code
  • --qr PATH - Use existing QR image
  • --banner - Create banner (text along paper length)
  • --font-size N - Set font size (default: 72)
  • --width N - Set image width in pixels (default: 714 for 62mm tape)
  • --gray N - Gray bias 0-100 (default: 50)
  • -d, --device - Specify printer device (default: auto-detect /dev/usb/lp*)

MQTT Client

Run the MQTT client for remote printing:

qltool_client

Send print jobs via MQTT:

# Simple print
mosquitto_pub -t qltool/print -m "Hello World -p"

# With QR code
mosquitto_pub -t qltool/print -m "Inventory Item -q -p"

# Banner
mosquitto_pub -t qltool/print -m "Long banner text --banner -p"

Development

Run directly from source:

# Preview
uv run src/qltool/main.py "Test text" --font-size 40

# Print
uv run src/qltool/main.py "Test text" --font-size 40 -p

Requirements

  • Brother QL-700 or QL-570 printer
  • User must be in lp group for printer access
  • Linux with USB lp device support (/dev/usb/lp*)

Org-mode Integration (Inventory)

For Emacs org-mode table integration:

;; Add to .emacs
(defun print-inventory-item ()
  "Print current org table row as label"
  (interactive)
  ;; Your implementation here
  )

Example table format:

ID Name Owner Location
D4-12345678 Sample inventory item Pepa Home

The tool can extract ID and name fields to generate QR-coded inventory labels.

Credits

  • ql570.c driver by Asbjørn Sloth Tønnesen, Marc Juul and Luca Zimmermann
  • Built with Python, Click, Pillow, and OpenCV

Metadata

Release files for qltool 0.2.6

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

Source distribution (sdist)

Source distribution for qltool 0.2.6
File Size Uploaded Provenance Actions
qltool-0.2.6.tar.gz 25.2 kB Without provenance Details for qltool-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qltool 0.2.6
File Interpreter ABI Platform Actions
qltool-0.2.6-py3-none-any.whl Python 3 none any Details for qltool-0.2.6-py3-none-any.whl

Total release size: 50.7 kB

Release files / qltool-0.2.6.tar.gz

Download URL qltool-0.2.6.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f2db6b1dae2d22a4da474f134e74816a533ff36704b79db7b8865c6eeb8cf6ca
BLAKE2b-256 checksum
How to use checksums
06bb35ffe88a8eb0ee0bab9af58f6abc0626a1c6444414704a44af3cf357fcb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.16

Release files / qltool-0.2.6-py3-none-any.whl

Download URL qltool-0.2.6-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32eaf58b5758789d340d9bcb2e4237fcdb5a6c7f7ddd17853df29f189a90cd16
BLAKE2b-256 checksum
How to use checksums
09f673f250b06fda13510b19bc97c3719c4b767b3b24592925969f65da8a854e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.16

Security for qltool 0.2.6

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.

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files No provenance

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