pydmtx is a thin python wrapper around libdmtx. It does one and only one thing (for now) – it creates DataMatrix barcode images.

Here's how it works:

from pydmtx import DataMatrix
dm = DataMatrix( "hello world" ) 'hello.png', 'png' )

That's it. You now have a PNG barcode of your data. Under the hood it uses PIL, so you can manipulate the actual Image object however you see fit. You can access it as dm.image (it's a read-only property).

I have working python implementations of Code 128 and Code 39 barcode generators as well, but this seems to be the tricky one. Eventually, I'll get around to releasing a more unified python barcoding package, but for now…


Keep in mind that this code is in it's infancy, is largely untested, and is based off a very early release of another library. Feedback is appreciated, as always.