skillfed

pylibdmtx

Read and write Data Matrix barcodes from Python 2 and 3.

pylibdmtx v0.1.10 232.3K downloads/30d#9,072 on PyPI176
Permissive license MIT AGING released

What it is and what it does

pylibdmtx is a Python wrapper around the libdmtx C library that lets you encode text or bytes into Data Matrix barcodes and decode them from images. It works with multiple image formats—image objects, numpy arrays, or raw byte tuples with width and height—making it flexible for different image-processing workflows.

The package is pure Python and has minimal runtime dependencies (enum34 and pathlib), but requires the libdmtx shared library to be installed on your system separately (included in Windows wheels, installed via package manager on Linux/macOS). It decodes barcodes and returns their content and location (left, top, width, height), and encodes strings or bytes into barcode images you can save or further process.

Use it for:

  • Batch-process images to extract Data Matrix barcode content and locations for inventory or document tracking.
  • Generate Data Matrix barcodes from product identifiers and embed them in images for printing or labeling.
  • Integrate barcode reading into image-processing pipelines without format conversion overhead.
  • Decode barcodes from raw image bytes or image objects in web services or CLI tools.
  • Automate cataloging workflows that rely on Data Matrix barcodes for specimen or artifact identification.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Reads and writes Data Matrix barcodes, accepting image objects, numpy arrays, and raw bytes, with barcode location decoding.

Yes, if you need Data Matrix barcode reading or writing and can install the libdmtx library on your system. The package is stable, permissively licensed, and has low install friction. However, maintenance is aging (last release 2022)—evaluate whether you need active support or can accept a stable, mature library. Not recommended if you require cutting-edge Python version support or expect ongoing feature development.

Install

pylibdmtx on PyPI

pip

pip install pylibdmtx

uv

uv add pylibdmtx

poetry

poetry add pylibdmtx

Installing pylibdmtx

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance is aging—last release was in 2022, though the repository remains unarchived. Runtime dependencies are minimal (enum34 and pathlib), but the underlying libdmtx C library must be installed separately on non-Windows systems.

License in practice

Distributed under the MIT license (permissive), so you can use it freely in commercial and private projects. The underlying libdmtx library is under the Simplified BSD license, also permissive.

Quickstart

pip install pylibdmtx
from pylibdmtx.pylibdmtx import decode
result = decode(image_data)
print(result)  # [Decoded(data='...', rect=Rect(...))]

The libdmtx C library must be installed separately: 'brew install libdmtx' on macOS, 'sudo apt-get install libdmtx0a' on Linux. Windows wheels include the DLL.

Verify before relying

  • Whether the package is actively maintained or has entered maintenance-only mode given the 1613-day gap since last release.
  • Compatibility with Python versions beyond 3.10 (classifiers list up to 3.10).
  • Whether enum34 and pathlib are still necessary runtime dependencies for modern Python versions.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — enum34, pathlib
Maintenance aging — 1,613 days since the last release
Last repo commit
First released
Downloads 232,259/month — #9,072 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pylibdmtx-0.1.10-py2.py3-none-any.whl

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Utilities

Tags

data matrix barcode readerdata matrix barcode encoderbarcode generation pythonbarcode decoding librarydmtx python wrapperread write barcodesimage barcode detection
barcode-processingimage-ioc-bindings

More Utilities packages