ptouch - Brother P-touch Label Printer Library
A Python library for Brother P-touch label printers with support for USB and network connections.
Features
Support for multiple Brother P-touch models (PT-E550W, PT-P750W, PT-P900 series)
Network (TCP/IP) and USB connections
Text labels with customizable fonts and alignment
Image label printing
Multi-label printing with half-cut support
High resolution mode support
TIFF compression for efficient data transfer
Comprehensive error handling with specific exception types
Installation
pip install ptouch # Basic installation
pip install ptouch[usb] # With USB support
Quick Example
from ptouch import ConnectionNetwork, PTP900, TextLabel, Tape36mm
from PIL import ImageFont
connection = ConnectionNetwork("192.168.1.100")
printer = PTP900(connection, high_resolution=True)
font = ImageFont.load_default()
label = TextLabel("Hello World", Tape36mm, font=font)
printer.print(label)
Documentation
User Guide
API Reference