Construct Editor
This package provides a GUI (based on wxPython) for 'construct', which is a powerful declarative and symmetrical parser and builder for binary data. It can either be used standalone or embedded as a widget in another application.
Features:
- show documentation as tooltip
- different editors for:
- Integer values
- Enum values
- FlagsEnum values
- DateTime values
- undo/redo in HexEditor and in ConstructEditor
- extensible for custom constructs
Installation
The preferred way to installation is via PyPI:
pip install construct-editor
Development
This project uses uv as a project management tool. To set up your development environment, run the following command:
uv sync
To run the unit tests, run:
uv run poe test
To run the linter/code formatter (including auto fix), run:
uv run poe lint
To run all supported type checkers (currently mypy, pyright and ty), run:
uv run poe typecheck
To run unit tests, linter/code formatter and type checkers, run:
uv run poe check-all
Getting started (Standalone)
To start the standalone version, just execute the following in the command line:
construct-editor
Getting started (as Widgets)
This is a simple example
import wx
import construct as cs
from construct_editor.wx_widgets import WxConstructHexEditor
constr = cs.Struct(
"a" / cs.Int16sb,
"b" / cs.Int16sb,
)
b = bytes([0x12, 0x34, 0x56, 0x78])
app = wx.App(False)
frame = wx.Frame(None, title="Construct Hex Editor", size=(1000, 200))
editor_panel = WxConstructHexEditor(frame, construct=constr, binary=b)
editor_panel.construct_editor.expand_all()
frame.Show(True)
app.MainLoop()
This snipped generates a GUI like this:
Widgets
ConstructHexEditor
This is the main widget ot this library. It offers a look at the raw binary data and also at the parsed structure. It offers a way to modify the raw binary data, which is then automaticly converted to the structed view. It also supports to modify the structed data and build the binary data from it.
ConstructEditor
This is just the right side of the ConstructHexEditor, but can be used also used as standalone widget. It provides:
- Viewing the structure of a construct (without binary data)
- Parsing binary data according to the construct
HexEditor
Just the left side of the ConstructHexEditor, but can be used also used as standalone widget. It provides:
- Viewing Bytes in a Hexadecimal form
- Callbacks when some value changed
- Changeable format via
TableFormat
Metadata
Release files for construct-editor 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| construct_editor-0.2.0.tar.gz | 84.9 kB | With provenance | Details for construct_editor-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| construct_editor-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for construct_editor-0.2.0-py3-none-any.whl |
Total release size: 189.3 kB
Release files / construct_editor-0.2.0.tar.gz
| Download URL | construct_editor-0.2.0.tar.gz |
|---|---|
| Size | 84.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc9a752c1c50e0652e26e4d84cca59fc517f40867ab2a758d78348cf51293338
|
|
BLAKE2b-256 checksum How to use checksums |
824317b12ed24a8832cadfa5f5108708aee1fdf4a17dde959a5c889e96e92e38
|
| 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 Jul 30, 2026.
Transparency logRelease files / construct_editor-0.2.0-py3-none-any.whl
| Download URL | construct_editor-0.2.0-py3-none-any.whl |
|---|---|
| Size | 104.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36abfc639ba0e932748e796da078ab0107d6e302d0c1073aa92459cc81118800
|
|
BLAKE2b-256 checksum How to use checksums |
93b0d0ae4810886ca161b31c10381913220b274f13ad3a823f866313876079ae
|
| 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 Jul 30, 2026.
Transparency logSecurity for construct-editor 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for construct_editor-0.2.0.tar.gz
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 Jul 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.