Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lab Barcode Generator

Generate GMP-compliant barcodes for laboratory sample labeling in SVG and PNG formats with optional human‑readable text labels.

Features

  • Barcode types: Code128, Code39, EAN‑13
  • Output formats: SVG (default) and PNG
  • Add labels: print a line of text above the barcode (e.g., sample ID, lot number) directly into the image
  • Adjustable: module width and quiet‑zone toggle
  • High contrast black‑on‑white output for reliable scanning
  • Rigorous input validation with clear error messages
  • Lightweight dependencies: python‑barcode and Pillow

Installation

Clone the repository and install the dependencies:

git clone https://github.com/yourusername/lab-barcode-generator.git
cd lab-barcode-generator
pip install -r requirements.txt

Usage

# Generate a Code128 barcode as SVG with a label
python run.py --text "SMPL-2026-001" --type code128 --output mylabel -f svg --label "Sample 001"

# Generate a PNG barcode with a smaller module width and no label
python run.py --text "123456789012" --type ean13 --output product_ean -f png --module-width 0.15 --no-quiet

# List supported barcode types
python -m lab_barcode_gen --list-types

Running python run.py --help shows all options.

GMP Compliance

The tool produces crisp, high‑contrast images suitable for pharmaceutical and GMP environments where accurate sample identification is critical. The output is deterministic and reproducible for any given input.

License

MIT License – see LICENSE.

About

GMP-compliant barcode generator for laboratory sample labeling, outputting SVG or PNG with human-readable labels.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages