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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

arbez_dmtx-0.0.2-py3-none-win_amd64.whl (71.4 kB view details)

Uploaded Python 3Windows x86-64

arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl (327.6 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl (319.4 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl (325.8 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl (315.3 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl (120.3 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file arbez_dmtx-0.0.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: arbez_dmtx-0.0.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 71.4 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for arbez_dmtx-0.0.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0730d62cf2a257d562e4613eafc4bd50bfa2f956026bb9317a46948491b06224
MD5 52582c50e33d8a75e367e33ee95922ea
BLAKE2b-256 5534c0a1dda58d79fb08d8f4107cc09908933e3d776f4b24f2da1c7de67e8bb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arbez_dmtx-0.0.2-py3-none-win_amd64.whl:

Publisher: release.yml on arbez-org/arbez-dmtx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6ebd29c569010edd2e8c1a6231eceb233e7e443f07f38fb6aa2e62e5d754e385
MD5 a2c60004fdf9a5e8b1a7094cc9957e5c
BLAKE2b-256 d2952fcdfa0a2f57ab21e58cd83c2120ae2d37ec1ef8854449323c160bf77098

See more details on using hashes here.

Provenance

The following attestation bundles were made for arbez_dmtx-0.0.2-py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on arbez-org/arbez-dmtx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 24a7ff84a653b962d10d9b53bbc76ecb6ade01f536153202cb08a6dffc7271ac
MD5 06ec68dbba759f5b5bca8018526d6496
BLAKE2b-256 dbc10d2a02077cdee4dd52788c70f2cfbd9bce3436dc23c630ca626d90993aac

See more details on using hashes here.

Provenance

The following attestation bundles were made for arbez_dmtx-0.0.2-py3-none-musllinux_1_2_aarch64.whl:

Publisher: release.yml on arbez-org/arbez-dmtx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6deb5c7e63e944eeeb751853d95a37b432701ca132a740fb79337304813f5c02
MD5 d304361287e226448aec12871f2b849d
BLAKE2b-256 16a44fbe5c626471d9a6739643efb981d07c38bc678ad3ba60d028d11c114b56

See more details on using hashes here.

Provenance

The following attestation bundles were made for arbez_dmtx-0.0.2-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on arbez-org/arbez-dmtx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2fe1b8f224a85a0e94879faa76993475c8c905f4b60c65374034a8b88b934b60
MD5 f40e3ce6114b92592e5f56c273941643
BLAKE2b-256 0e6c1732f844afeb346ddb1eed4921a01ec724fad59ab70b6d4252e580aca9c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for arbez_dmtx-0.0.2-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on arbez-org/arbez-dmtx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8fcb6574318ed343267de53024eee4781a423a487e144f88bbb173efac396b7
MD5 e8c6d660dc0a4f08aa2f1fd7be073b4a
BLAKE2b-256 59c5ad3ddef66304711c79e4bc4f6dbebf8ee898138d087530cefc21c29eb495

See more details on using hashes here.

Provenance

The following attestation bundles were made for arbez_dmtx-0.0.2-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on arbez-org/arbez-dmtx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page