Skip to main content

arbez-dmtx

PyPI CI Python 3.10–3.15 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.15, including free-threaded 3.13t / 3.14t / 3.15t.

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.15 incl. free-threaded 3.13t/3.14t/3.15t
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/3.15t.

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.

Metadata

Release files for arbez-dmtx 0.0.3

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.3
File
arbez_dmtx-0.0.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
arbez_dmtx-0.0.3-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
arbez_dmtx-0.0.3-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
arbez_dmtx-0.0.3-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
arbez_dmtx-0.0.3-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
arbez_dmtx-0.0.3-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.3-py3-none-win_amd64.whl

Download URL arbez_dmtx-0.0.3-py3-none-win_amd64.whl
Size 71.3 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
52ccc4ee953344f82aa6ea584ff2d5e83dfe62bf7d00998f84dc223ee21be692
BLAKE2b-256 checksum
How to use checksums
3c9fa04b5b208c1a2aa456eb370b133d1f4173f814aec5d3929555ec8ed54b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL arbez_dmtx-0.0.3-py3-none-musllinux_1_2_x86_64.whl
Size 327.5 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5a259011d881feb3d08f30314b893ec9c731909fa0a151ce282e1c9583cceae2
BLAKE2b-256 checksum
How to use checksums
750c59e1dd000319b6b91f138046e80bbd1e6adda6567c7106c5f08164b445e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL arbez_dmtx-0.0.3-py3-none-musllinux_1_2_aarch64.whl
Size 319.2 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
069491c0350e77728db042ff5d4342e109d09824f42e8095d7ff70fe3fcf4733
BLAKE2b-256 checksum
How to use checksums
f3af829a17e4c520128f973f95768a7686abacca3928e6299254d845850ec115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL arbez_dmtx-0.0.3-py3-none-manylinux_2_28_x86_64.whl
Size 325.7 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
77ce4f10f80ffb0516d12bea70e4e0b40a7216a2c8744095e09b61aa19710ff3
BLAKE2b-256 checksum
How to use checksums
dd7978ef5b84b81be8e466e3e9e68f4714ef4076a5705654d3e073331da9897c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL arbez_dmtx-0.0.3-py3-none-manylinux_2_28_aarch64.whl
Size 315.2 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d6bed8c0a8a1a48621de983221947be71d04da86cf5aafcfd2a239d6c416e5e9
BLAKE2b-256 checksum
How to use checksums
e44ffe7e40f1efdab2d686dbffce80ed491085f67a791b1a873785ae8427fb0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

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

Download URL arbez_dmtx-0.0.3-py3-none-macosx_11_0_arm64.whl
Size 120.1 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
01bab331037adc4c28498c64b4e9bdc5453d86515232e668db2d99c0cf64e8fd
BLAKE2b-256 checksum
How to use checksums
d49358bbd967d8878b326141d9e2bd79b7df6f2b3658fc79dc1961b1ec056c31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.3 This release

6 release files

0.0.2

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