Skip to content

boosterl/lably

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lably icon

Lably

A desktop GUI application for printing labels on DYMO Bluetooth label printers.

Lably supports two GUI backends — Tkinter (default, no extra dependencies) and GTK 4 + Libadwaita — selected at runtime via an environment variable.

Lably screenshot

Features

  • Print image files directly to a DYMO Bluetooth printer
  • Generate and print Code 128 barcodes from text input
  • Optional reverse/invert mode for both image and barcode printing
  • Two UI backends: classic Tkinter or modern GTK 4 + Libadwaita

Requirements

  • Python 3.8–3.14
  • A DYMO Bluetooth label printer
  • Bluetooth support on your system
  • For the GTK 4 backend: GTK 4 and Libadwaita system libraries

Installation

Install from source using pip:

git clone https://github.com/boosterl/lably.git
cd lably
pip install .

To include the optional GTK 4 backend:

pip install ".[gtk4]"

Usage

lably           # Launch Lably
python -m lably # Run directly as a module

Lably automatically uses the GTK 4 + Libadwaita backend when PyGObject is available, and falls back to Tkinter otherwise. To get the GTK 4 UI, install Lably with the gtk4 extra (see Installation).

File Picker tab

Browse for an image file on your system and send it to the printer. Check Reverse to invert the image before printing.

Text Field tab

Enter any text and print it as a Code 128 barcode. Check Reverse to invert the barcode before printing.

Development

Setup

Install in editable mode with development tools:

git clone https://github.com/boosterl/lably.git
cd lably
pip install -e .
pip install pytest ruff black mypy

Project structure

lably/
├── __main__.py               # Entry point
├── core/
│   └── printer.py            # Bluetooth printer logic (async/await)
├── ui/
│   ├── __init__.py           # Factory: create_main_window()
│   └── base_window.py        # Abstract base class for UI backends
└── platforms/
    ├── tk/
    │   └── main_window.py    # Tkinter implementation
    └── gtk4/
        └── main_window.py    # GTK 4 + Libadwaita implementation

Linting and formatting

ruff check .      # lint
black .           # format
black --check .   # check formatting without modifying files

Type checking

mypy lably/

Tests

pytest lably/tests/
pytest -v lably/tests/   # verbose
pytest -x lably/tests/   # stop on first failure

Credits

Bluetooth printer communication is powered by dymo-bluetooth by @ysfchn. This library handles printer discovery, image preparation, and Bluetooth communication with DYMO label printers.

Barcode generation uses python-barcode.

License

GPL-3.0 — see LICENSE for details.

About

Lably - a desktop app for printing labels on DYMO Bluetooth printer. Supports GTK4 + Libadwaita and Tkinter backends.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages