Description
Construct is a powerful declarative and symmetrical parser and builder for binary data.
Instead of writing imperative code to parse a piece of data, you declaratively define a data structure that describes your data. As this data structure is not code, you can use it in one direction to parse data into Pythonic objects, and in the other direction, to build objects into binary data.
The library provides both simple, atomic constructs (such as integers of various sizes), as well as composite ones which allow you form hierarchical and sequential structures of increasing complexity. Construct features bit and byte granularity, easy debugging and testing, an easy-to-extend subclass system, and lots of primitive constructs to make your work easier:
Construct alternatives and similar packages
Based on the "Parser" category.
Alternatively, view Construct alternatives based on common mentions on social networks and blogs.
-
Lark
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity. -
msgspec
A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML -
python-user-agents
A Python library that provides an easy way to identify devices like mobile phones, tablets and their capabilities by parsing (browser) user agent strings. -
pyparsing
DISCONTINUED. Python library for creating PEG parsers [Moved to: https://github.com/pyparsing/pyparsing]
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Construct or a related project?