Barcode rendering for Python 2 and 3 supporting QRcode, Aztec, PDF417, I25, Code128, Code39 and many more types.
Project description
A cleverly named, but very simple python barcode renderer wrapping the BWIPP library and ghostscript command line. It is also Python 2.7 and Python 3.3+ compatible.
Supported barcode types
It should support more or less everything that is supported by BWIPP, but these types are specifically verified in the tests:
qrcode - QR Code
azteccode - Aztec Code
pdf417 - PDF417
interleaved2of5 - Interleaved 2 of 5
code128 - Code 128
code39 - Code 39
Example
>>> import treepoem
>>> image = treepoem.generate_barcode(
... 'qrcode', # One of the BWIPP supported codes.
... 'barcode payload',
... {},
... )
>>> 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.
History
1.0.0
Use $PATH to find gs binary.
Rename PostscriptError to TreepoemError.
Add basic setup.py.
Setup Travis CI build.
Setup Tox
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.