Skip to content

dlenski/treepoem

 
 

Repository files navigation

Treepoem

image

image

A cleverly named, but very simple python barcode renderer wrapping the BWIPP library and ghostscript command line tool. It is also Python 2.7 and Python 3.3+ compatible.

Install

Install from pip:

pip install treepoem

You'll also need Ghostscript installed. On Ubuntu/Debian this can be installed with:

apt-get install ghostscript

On Mac OS X use:

brew install ghostscript

Otherwise refer to your distribution's package manager, though it's likely to be called ghostscript too.

Supported barcode types

It should support more or less everything that is supported by BWIPP, but these types are specifically verified in the tests:

Example

>>> import treepoem
>>> image = treepoem.generate_barcode(
...     barcode_type='qrcode',  # One of the BWIPP supported codes.
...     data='barcode payload',
...     options={},
... )
>>> image.save('barcode.png')  # This is an instance of `PIL.EpsImagePlugin.EpsImageFile`

A file barcode.png should appear in your current directory with a QR code.

What's so clever about the name?

Barcode - Treepoem.

Bark ode.

Tree poem.

About

Barcode rendering for Python 2 and 3 supporting QRcode, Aztec, PDF417, I25, Code128, Code39 and many more types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PostScript 99.5%
  • Python 0.5%