Skip to main content

Universal Brother Label Printer with PNG and labelprinterkit modes

Project description

pybrother

A Python CLI and helper library for printing labels on networked Brother P‑touch printers using their raster command set.

Quick Start

Run without installing

# Show help
uvx pybrother -- --help

# Print a label
uvx pybrother -- "Hello World" --printer 192.168.1.100

uvx will download the package, create an isolated environment, and run the pybrother console entry point (an alias named brother-printer remains for compatibility).

Install from PyPI

pip install pybrother

# Then use the CLI directly
pybrother "Hello World" --printer 192.168.1.100

Command Options

The CLI supports the following useful switches:

  • text – Label text (wrap in quotes for spaces)
  • --font – Font size in dots (default: auto size per tape)
  • --tape – Tape size (W3_5, W6, W9, W12, W18, W24)
  • --margin – Left/right margin in pixels (default: 10)
  • --copies – Number of copies to print (default: 1)
  • --printer – Printer IP address (required unless discovered or from env var)
  • --listen – Passively listen for printers via mDNS (requires zeroconf)
  • --listen-timeout – Seconds to wait when listening (default: 70)
  • --no-auto-detect – Skip automatic tape detection

Set BROTHER_PRINTER_IP to avoid providing --printer each invocation.

Development

# Install dependencies (including dev extras)
uv sync --extra dev

# Run the test suite
uv run pytest

# Build a wheel and sdist
uv run hatch build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybrother-0.1.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pybrother-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file pybrother-0.1.1.tar.gz.

File metadata

  • Download URL: pybrother-0.1.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for pybrother-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f0ad2aa18a1a4342d9d96e26006a33984e4ad645fdae904e3971ba470d22a1b2
MD5 fa85068f31ca7bb4445b9b523372a822
BLAKE2b-256 cdadd53eac82998a6b4cd4bf4a01d76258fd2809709c275ef7d403a8a394979a

See more details on using hashes here.

File details

Details for the file pybrother-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pybrother-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for pybrother-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb8159cff4464bfb3cd1dfa09886f3cf8f879a30517df4588c4f67049bda00ec
MD5 1fc5b54e2c66f55f79f4f870695557dd
BLAKE2b-256 b69c1ebb673b097e1c77c3ec70ecfcaece5cf5fd37dbe3c227f8a3f8c520a640

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page