pylibdmtx
Read and write Data Matrix barcodes from Python 2 and 3.
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 pylibdmtxuv
uv add pylibdmtxpoetry
poetry add pylibdmtxInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pyzbarDecodes one-dimensional barcodes and QR codes…
permissive · top 5,000 on PyPI
pyzxingDecode barcodes and QR codes from images or…
permissive · top 15,000 on PyPI
zxing-cppReads and writes barcodes and QR codes in…
permissive · top 5,000 on PyPI
ppf-datamatrixGenerates datamatrix codes (2D barcodes) in SVG…
permissive · top 15,000 on PyPI
pyStrichpyStrich generates 1D and 2D barcodes (Code 39,…
permissive · top 15,000 on PyPI
biipBiip parses and interprets data encoded in…
permissive · top 15,000 on PyPI
OpenEXRRead and write OpenEXR image files with support…
unclear · top 15,000 on PyPI
pdf417genEncodes text and binary data into PDF417 2D…
permissive · top 15,000 on PyPI
treepoemGenerates barcodes and QR codes as image…
permissive · top 5,000 on PyPI
qreaderQReader detects and decodes QR codes from…
permissive · top 15,000 on PyPI