Skip to main content

arbez-dmtx

PyPI CI Python 3.10–3.14 License: Apache-2.0

Read and write Data Matrix barcodes from Python — with the native libdmtx library bundled in the wheel on every platform. No brew install / apt-get install, no compiler. Pure ctypes, so one small wheel per platform works on all of Python 3.10–3.14, including free-threaded 3.13t / 3.14t.

from arbez_dmtx import decode, encode
from PIL import Image

decode(Image.open("code.png"))
# [Decoded(data=b'Stegosaurus', rect=Rect(left=5, top=6, width=96, height=95))]

enc = encode(b"hello")
Image.frombytes("RGB", (enc.width, enc.height), enc.pixels).save("dmtx.png")

Install

pip install arbez-dmtx

That's it — the libdmtx shared library is inside the wheel. No system packages.

Supported platforms (wheels are published for these; there is no sdist, so pip install requires a matching wheel):

OS Arch Wheel
macOS arm64 (Apple Silicon) ✅
Linux x86_64, aarch64 (glibc / manylinux_2_28) ✅
Linux x86_64, aarch64 (musl / musllinux_1_2, e.g. Alpine) ✅
Windows x86_64 ✅

Not yet built: macOS x86_64 (Intel), Windows arm64. If you need one, open an issue.

Relationship to pylibdmtx

arbez-dmtx is a friendly, modernised continuation of pylibdmtx by Lawrence Hudson / the Natural History Museum (MIT). It vendors pylibdmtx's excellent ctypes wrapper and keeps the same public API, but closes the gaps that made pylibdmtx awkward to depend on in 2026:

pylibdmtx arbez-dmtx
Native libdmtx bundled Windows only every OS (macOS arm64, Linux x86_64/aarch64, Windows)
Off-Windows install brew/apt the system lib yourself nothing — it's in the wheel
Python support 2.7, 3.5–3.10 3.10–3.14 incl. free-threaded 3.13t/3.14t
Bundled libdmtx 0.7.x (older) tracks upstream (currently 0.7.8) via a CI watcher
distutils required (broken on 3.12+) removed
PyPI freshness stale maintained

Migrating is a one-line import swap — the function/return signatures match:

# before
from pylibdmtx.pylibdmtx import decode, encode
# after
from arbez_dmtx import decode, encode

If you only need this library on Windows, pylibdmtx already works great; the value here is everywhere else (and on the new free-threaded interpreters).

API

The full pylibdmtx surface is re-exported at the top level:

from arbez_dmtx import (
    decode, encode,                       # the two operations
    Decoded, Rect, Encoded,               # result types
    ENCODING_SCHEME_NAMES, ENCODING_SIZE_NAMES,  # encode() vocabularies
    PyLibDMTXError,                       # error type
    libdmtx_version,                      # bundled libdmtx version string
)
  • decode(image, ...) accepts a PIL.Image, a numpy.ndarray (e.g. from OpenCV), or a (pixels, width, height) tuple, and the full libdmtx tuning surface: timeout, gap_size, shrink, shape, deviation, threshold, min_edge, max_edge, corrections, max_count. Returns a list of Decoded(data: bytes, rect: Rect).
  • encode(data, scheme=None, size=None) → Encoded(width, height, bpp, pixels); scheme/size come from ENCODING_SCHEME_NAMES / ENCODING_SIZE_NAMES.

Why pure ctypes?

No compiled extension means (a) one py3-none-<platform> wheel covers every Python version — including the free-threaded builds, with no per-ABI matrix — and (b) importing it never re-enables the GIL; ctypes releases the GIL around each native call, so concurrent decode is safe on 3.13t/3.14t.

License & attribution

Apache-2.0 (this wrapper). Bundles libdmtx (BSD-2-Clause, © Mike Laughton, Vadim A. Misbakh-Soloviov and others) and vendors the pylibdmtx ctypes wrapper (MIT, © Lawrence Hudson). Full notices in NOTICE; the libdmtx license also ships inside each wheel as THIRD_PARTY_LICENSES_libdmtx.txt.

Not affiliated with or endorsed by the pylibdmtx authors — just standing on their shoulders, gratefully.

Release files for arbez-dmtx 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for arbez-dmtx 0.0.2
File
arbez_dmtx-0.0.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 1.5 MB

Release files / arbez_dmtx-0.0.2-py3-none-win_amd64.whl

Download URL arbez_dmtx-0.0.2-py3-none-win_amd64.whl
Size 71.4 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
0730d62cf2a257d562e4613eafc4bd50bfa2f956026bb9317a46948491b06224
BLAKE2b-256 checksum
How to use checksums
5534c0a1dda58d79fb08d8f4107cc09908933e3d776f4b24f2da1c7de67e8bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl

Download URL arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl
Size 327.6 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6ebd29c569010edd2e8c1a6231eceb233e7e443f07f38fb6aa2e62e5d754e385
BLAKE2b-256 checksum
How to use checksums
d2952fcdfa0a2f57ab21e58cd83c2120ae2d37ec1ef8854449323c160bf77098
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl

Download URL arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl
Size 319.4 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
24a7ff84a653b962d10d9b53bbc76ecb6ade01f536153202cb08a6dffc7271ac
BLAKE2b-256 checksum
How to use checksums
dbc10d2a02077cdee4dd52788c70f2cfbd9bce3436dc23c630ca626d90993aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl

Download URL arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl
Size 325.8 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6deb5c7e63e944eeeb751853d95a37b432701ca132a740fb79337304813f5c02
BLAKE2b-256 checksum
How to use checksums
16a44fbe5c626471d9a6739643efb981d07c38bc678ad3ba60d028d11c114b56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl

Download URL arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl
Size 315.3 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2fe1b8f224a85a0e94879faa76993475c8c905f4b60c65374034a8b88b934b60
BLAKE2b-256 checksum
How to use checksums
0e6c1732f844afeb346ddb1eed4921a01ec724fad59ab70b6d4252e580aca9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl

Download URL arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl
Size 120.3 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d8fcb6574318ed343267de53024eee4781a423a487e144f88bbb173efac396b7
BLAKE2b-256 checksum
How to use checksums
59c5ad3ddef66304711c79e4bc4f6dbebf8ee898138d087530cefc21c29eb495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

6 release files

0.0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page