Install & Compatibility
Where this runs
tested against v0.2.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Self
✓ from construct_classes import Self
Struct
✓ from construct_classes import Struct
dataclass_transform
✓ from construct_classes import dataclass_transform
✗ from construct_classes import construct_dataclass
Define a dataclass with construct fields and parse binary data.
from construct import Struct, Int32ul, Hex, Int8ul
from construct_classes import construct_dataclass
@construct_dataclass
class MyStruct:
x: int = Int32ul
y: int = Hex(Int8ul)
# Parse binary data
data = b'\x01\x00\x00\x00\x02'
obj = MyStruct.parse(data)
print(obj.x, obj.y)
Upgrade
Version history
0.2.3latest on PyPI · released Mar 31, 2026
Audit
Dependencies
constructrequiredconstruct-classes builds on construct for binary parsing