Registered 2009-03-01 by Peter Gebauer

Small barcode library I made for another project, thought it might be useful to someone else.

Barcode library written in Python, you can currently write EAN-13, Code-128A, Code128-B, Code128-C and Gs1.
It also includes a CLI tool that can generate barcode image files and GTK GUI examples with printing support.
Future releases will include EAN-8 and EAN-18 barcodes as well as a small layout engine to design labels for printing, maybe even some Qt examples too.

I have verified the barcodes using a cheap Deltaco (KB Wedge B519153) CCD handheld barcode scanner.

Here's a simple snippet on how to render EAN-13 and Code-128B barcodes:

    from barcodes.ean import Ean
    from barcodes.code128 import Code128
    from barcodes.write import CairoRender

    CairoRender(Ean("12 3456789012"), margin=8).save_svg("test-ean.svg", 160, 80)
    print CairoRender(Code128.from_unicode(u"CODE128B"), margin=4).get_svg(160, 80)

There is more functionality and ways of doing it, most shown in the demos, but this should give you an idea of how it works. Have fun!

Project information

Peter Gebauer
Not yet selected

RDF metadata

View full history Series and milestones

devel series is the current focus of development.

All code Code

Version control system:

All bugs Latest bugs reported

Get Involved

  • Report a bug
  • warning
    Ask a question
  • warning
    Help translate


Barcodes for Python does not have any download files registered with Launchpad.