$npx skillfedfor your agent

construct-classes

Parse your binary structs into dataclasses

With conditionsPyPI Software DevelopmentReleased Mar 2026158.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — construct_classes-0.2.3-py3-none-any.whl
v0.2.3 · released 2026-03-31 · Python <4.0,>=3.10 · 1 runtime deps: construct

Yes, if you need to work with binary data formats and want the safety of typed dataclasses. The package is actively maintained, has no security vulnerabilities, and low install friction. The main trade-off is that you must manually keep Construct expressions and dataclass fields in sync—this is acceptable for small to medium projects but could become error-prone at scale without additional tooling like construct-typing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Programmer must manually write matching Construct expressions and dataclass fields—no automatic type verification.
  • Low friction: pure Python wheel with a single runtime dependency (construct).

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.

last release 2026-03-31 (136 days) · last repo commit 2026-03-31 · 6 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 158,535 downloads/mo, #10,720 on PyPI

Verify before relying

pip install construct-classes

import construct as c
from construct_classes import Struct

class BasicStruct(Struct):
    x: int
    y: int
    SUBCON = c.Struct(
        "x" / c.Int32ul,
        "y" / c.Int32ul,
    )

data = b"\x01\x00\x00\x00\x02\x00\x00\x00"
parsed = BasicStruct.parse(data)
built = BasicStruct(x=100, y=200).build()
  • Whether construct-typing provides the full type-checking experience mentioned in the description and how it integrates with construct-classes
  • Performance characteristics when parsing or packing large or deeply nested binary structures
Same gist for agents: .md · .json

What it is and what it does

construct-classes bridges the gap between the construct library and Python dataclasses, letting you define binary data formats as typed dataclass structs. You write a Construct expression in a SUBCON class attribute, and the package handles parsing binary input into dataclass instances and building dataclass instances back into binary output. The dataclass fields must match the Construct struct field names, and you are responsible for keeping them in sync—there is no automatic type verification.

The package supports nested structs and lists through explicit type hints and a subcon() helper, and it integrates with the dataclass decorator system, allowing you to use standard dataclass parameters like frozen=True or kw_only. It typechecks cleanly with mypy and pyright, making it suitable for projects that want strong typing around binary protocols.

Use it for

  • Parse network protocol packets or binary file formats into typed dataclass objects for type-safe processing
  • Serialize application dataclasses into binary format for storage or transmission over binary protocols
  • Define binary struct schemas as Python classes with IDE autocompletion and static type checking
  • Build binary protocol handlers where construct expressions define the wire format and dataclasses define the in-memory representation

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to work with binary data formats and want the safety of typed dataclasses.

The package is actively maintained, has no security vulnerabilities, and low install friction. The main trade-off is that you must manually keep Construct expressions and dataclass fields in sync—this is acceptable for small to medium projects but could become error-prone at scale without additional tooling like construct-typing.

Install

construct-classes on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency (construct). Actively maintained with recent commits and no known vulnerabilities.

Requires Python 3.10 or later. Programmer must manually write matching Construct expressions and dataclass fields—no automatic type verification.

License in practice

MIT license permits commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

pip install construct-classes

import construct as c
from construct_classes import Struct

class BasicStruct(Struct):
    x: int
    y: int
    SUBCON = c.Struct(
        "x" / c.Int32ul,
        "y" / c.Int32ul,
    )

data = b"\x01\x00\x00\x00\x02\x00\x00\x00"
parsed = BasicStruct.parse(data)
built = BasicStruct(x=100, y=200).build()

Verify before relying

  • Whether construct-typing provides the full type-checking experience mentioned in the description and how it integrates with construct-classes
  • Performance characteristics when parsing or packing large or deeply nested binary structures

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
construct
MaintenanceActively maintained 136 days since the last release
Last repo commit
First released
Downloads158,535 / month, #10,720 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: construct_classes-0.2.3-py3-none-any.whl

Tags

Capabilities
binary data parsing dataclassstruct serialization deserializationbinary format to dataclassconstruct wrapper dataclasspack unpack binary structbinary protocol dataclasstyped binary parsing
Topics
binary-parsingdataclass-serialization

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “binary data parsing dataclass”

  • construct-classesParses binary data into Python dataclasses and packs dataclasses back…
  • construct-typingAdds type hints and static type checking support to the construct…
  • ormsgpackormsgpack is a fast MessagePack serialization library for Python that…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also construct-typing · flexparser · pymp4 · construct · pycstruct · kaitaistruct · dissect.cstruct · bitstruct · databind · plum-py