Skip to main content

PartDB Labeler

Project description

partdb-labeler

example

Connects to a PartDB server, grabs info for a selected part, and formats a label to be printed on an EPL2-compatible label printer. Command-line options enable configuration of the label size, server to use, and more.

Why did I write this?

PartDB has a label generator built-in, but it only produces PDFs that must then be rasterized and printed. This works well enough if you're sending labels to a laser printer, but I found that QR codes small enough to fit on the label stock I wanted to use weren't scannable. This generator speaks EPL2, one of the languages used by Zebra label printers, to produce precisely-formatted labels with QR codes that scan easily with your phone or a dedicated barcode scanner.

Compatibility

So far, it's been tested with two Zebra printers: an LP2844 and a GK420t. The LP2844 was driven by an Arch Linux system with a CUPS print queue feeding it through a network print server. The GK420t was driven by a Windows 11 system, connected to the printer via USB.

Usage

partdb_labeler -h will show you the available options.

For convenience, you might also consider adding a short shell script somewhere in your PATH that will call the Python module with your server configuration. I use this (the API key is a read-only key I've publicized elsewhere):

#!/usr/bin/env bash
partdb_labeler -p https://partdb.alfter.us -k tcp_673fc81f0b7837ca4c029fbd6536b27742eb8b742eba27bf547c8136dc6a84f8 $*

or the same, as a batch file on Windows:

@echo off
partdb_labeler -p https://partdb.alfter.us -k tcp_673fc81f0b7837ca4c029fbd6536b27742eb8b742eba27bf547c8136dc6a84f8 %*

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

partdb_labeler-0.2.4.tar.gz (110.8 kB view details)

Uploaded Source

Built Distribution

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

partdb_labeler-0.2.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file partdb_labeler-0.2.4.tar.gz.

File metadata

  • Download URL: partdb_labeler-0.2.4.tar.gz
  • Upload date:
  • Size: 110.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for partdb_labeler-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c75f7bc5e4e7212d365f2466d741cf663f36d913945f12523a75a4e41e871a20
MD5 363ec6409a0f913f1eb0a2b08d72999c
BLAKE2b-256 defdb9e2c89e78168ed06434e29761333e550dd090e938e9c7b23c5b19fc2555

See more details on using hashes here.

File details

Details for the file partdb_labeler-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: partdb_labeler-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for partdb_labeler-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81938c9ed586a2a2a58fb41026581e13f64597cc7fe304424207efcf9af2c9e5
MD5 ad21820172c5e737ff3a5b5cddf2948d
BLAKE2b-256 943bd0a99a811dee385f1c363b3e479bc47d8a7cd3453fcab77995d2e8526212

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