# construct-gallery
[![PyPI](https://img.shields.io/pypi/v/construct-gallery.svg?maxAge=2592000)](https://pypi.org/project/construct-gallery)
[![Python Versions](https://img.shields.io/pypi/pyversions/construct-gallery.svg)](https://pypi.org/project/construct-gallery/)
[![PyPI download month](https://img.shields.io/pypi/dm/construct-gallery.svg)](https://pypi.python.org/pypi/construct-gallery/)
[![GitHub license](https://img.shields.io/badge/license-CC--BY--NC--SA--4.0-blue)](https://raw.githubusercontent.com/ircama/construct-gallery/master/LICENSE)
__wxPython Widgets extending functionalities of *construct-editor*__
The following Python modules are included:
- `construct_gallery.py`, providing the `ConstructGallery()` class.
This module implements a GUI editor to parse and build an editable and ordered list of binary data via a gallery of predefined [construct](https://construct.readthedocs.io/en/latest/) data structures.
*construct* is a powerful, declarative, symmetrical parser and builder for binary data.
`construct_gallery.py` is based on [wxPython](https://www.wxpython.org/) and [construct-editor](https://github.com/timrid/construct-editor): it relies on the excellent editing widgets provided by the *construct-editor* module and offers a superset of features compared with its standard [GUI](https://github.com/timrid/construct-editor/blob/main/construct_editor/main.py).
This module can be directly used in GUI programs, or can be further extended with `bleak_scanner_construct.py`.
- `config_editor.py`, providing the `ConfigEditorPanel()` class (widget).
This widget implements an editing GUI composed by a form including multiple byte structures, each one related to its own *construct* data model.
The structure of this form is described by the "editing_structure" parameter.
- `bleak_scanner_construct.py`, providing the `BleakScannerConstruct()` class.
The component implements a [Bluetooth Low Energy](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy) (BLE) GUI client to log, browse, test and edit [BLE advertisements](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#Advertising_and_discovery).
This module extends `construct_gallery.py`, offering a skeleton of BLE Advertiser scanner.
[bleak](https://bleak.readthedocs.io/en/latest/) is needed (`pip3 install bleak`)
*construct-gallery* also includes a number of *construct-editor* plugins, which are used by `ConstructGallery()` and `BleakScannerConstruct()`, but they can be separately reused on projects based on *construct-editor*.
- plugins offering additional options for the context menu of the *construct-editor* HexEditorGrid (invoked with the right click of the mouse):
- `allow_python_expr_plugin.py`
- `decimal_convert_plugin.py`
- `string_convert_plugin.py`
- PyShell plugin `pyshell_plugin.py`, adding a button to activate a PyShell frame (PyShell is a GUI-based python shell).
- `wx_logging_plugin.py`, providing a debug GUI panel in background.
- `pyshell_plugin.py`, activating a Python shell button that allows opening an inspector shell, which also includes a special *Help* with related submenu (that can be invoked also via F9).
## Main functionalities
- Cross-platform GUI
- The GUI includes a BLE control (implemented with buttons) which allows starting and stopping the BLE advertising receiver. Advertisements are logged in their reception sequence, automatically labbelled with the MAC address.
- A filter button can be used to enter a specific MAC address to restrict logging, a portion of it or a sequence of addresses, as well as BLE local names.
- Logged data can be saved to file in [pickle format](https://docs.python.org/3/library/pickle.html). Archives can be subsequently reloaded and appended to the current log. They can also be inspected with `python -mpickle archive-file-name.pickle`.
- Advertisement data are logged in the left panel, shown as hex bytes in the central panel and then parsed to browsable *construct* structures in the right panel.
- The Python error management is wrapped into a GUI panel.
- A Python shell button allows opening an inspector shell, which also provides a special *Help* with related submenu (or by pressing F9).
- All panels allow a context menu (invoked with the right click of the mouse) with a number of special functions.
- The left log menu panel allows renaming labels and changing MAC address. Also, by double clicking an unused area of the log panel, new frames can be added and then labelled; subsequently, a specific MAC address can be associated. Log elements can be repositioned, or deleted.
- The hex editor (central panel) allows any kind of copy/paste. Sequences of bytes can be pasted [in a number of different formats](https://github.com/timrid/construct-editor/pull/17#issuecomment-1367582581). Also a special checkbox enables pasting Python expressions. Two debugging tools are also provided (invoked with the right click of the mouse after selecting a sequence of bytes), to convert bytes into a wide set of numeric forms as well as strings; these debug panels can be used to quickly check the most appropriate conversion method for a sequence of bytes.
- When starting the BLE reception, a debug window is opened in background, with the possibility to control the debug level and clear the produced data.
Full information, installation notes, API reference and usage details at the [construct-gallery GitHub repository](https://github.com/Ircama/construct-gallery).
Raw data
{
"_id": null,
"home_page": "https://github.com/Ircama/construct-gallery",
"name": "construct-gallery",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "construct-gallery,construct-editor,module,gui,wx,wxpython,widget,binary,editorconstruct,bleak,BLE,bluetooth,plugin",
"author": "Ircama",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/cc/7f/6515d67eb66bee583f3cf3f8ba799d13277ae467a647c3c9f4ba4eb5526f/construct-gallery-1.3.0.tar.gz",
"platform": null,
"description": "# construct-gallery\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/construct-gallery.svg?maxAge=2592000)](https://pypi.org/project/construct-gallery)\r\n[![Python Versions](https://img.shields.io/pypi/pyversions/construct-gallery.svg)](https://pypi.org/project/construct-gallery/)\r\n[![PyPI download month](https://img.shields.io/pypi/dm/construct-gallery.svg)](https://pypi.python.org/pypi/construct-gallery/)\r\n[![GitHub license](https://img.shields.io/badge/license-CC--BY--NC--SA--4.0-blue)](https://raw.githubusercontent.com/ircama/construct-gallery/master/LICENSE)\r\n\r\n__wxPython Widgets extending functionalities of *construct-editor*__\r\n\r\nThe following Python modules are included:\r\n\r\n- `construct_gallery.py`, providing the `ConstructGallery()` class.\r\n\r\n This module implements a GUI editor to parse and build an editable and ordered list of binary data via a gallery of predefined [construct](https://construct.readthedocs.io/en/latest/) data structures.\r\n \r\n *construct* is a powerful, declarative, symmetrical parser and builder for binary data.\r\n \r\n `construct_gallery.py` is based on [wxPython](https://www.wxpython.org/) and [construct-editor](https://github.com/timrid/construct-editor): it relies on the excellent editing widgets provided by the *construct-editor* module and offers a superset of features compared with its standard [GUI](https://github.com/timrid/construct-editor/blob/main/construct_editor/main.py).\r\n \r\n This module can be directly used in GUI programs, or can be further extended with `bleak_scanner_construct.py`.\r\n\r\n- `config_editor.py`, providing the `ConfigEditorPanel()` class (widget).\r\n\r\n This widget implements an editing GUI composed by a form including multiple byte structures, each one related to its own *construct* data model.\r\n \r\n The structure of this form is described by the \"editing_structure\" parameter.\r\n\r\n- `bleak_scanner_construct.py`, providing the `BleakScannerConstruct()` class.\r\n\r\n The component implements a [Bluetooth Low Energy](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy) (BLE) GUI client to log, browse, test and edit [BLE advertisements](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#Advertising_and_discovery).\r\n \r\n This module extends `construct_gallery.py`, offering a skeleton of BLE Advertiser scanner.\r\n \r\n [bleak](https://bleak.readthedocs.io/en/latest/) is needed (`pip3 install bleak`)\r\n\r\n*construct-gallery* also includes a number of *construct-editor* plugins, which are used by `ConstructGallery()` and `BleakScannerConstruct()`, but they can be separately reused on projects based on *construct-editor*.\r\n\r\n- plugins offering additional options for the context menu of the *construct-editor* HexEditorGrid (invoked with the right click of the mouse):\r\n - `allow_python_expr_plugin.py`\r\n - `decimal_convert_plugin.py`\r\n - `string_convert_plugin.py`\r\n\r\n- PyShell plugin `pyshell_plugin.py`, adding a button to activate a PyShell frame (PyShell is a GUI-based python shell).\r\n\r\n- `wx_logging_plugin.py`, providing a debug GUI panel in background.\r\n- `pyshell_plugin.py`, activating a Python shell button that allows opening an inspector shell, which also includes a special *Help* with related submenu (that can be invoked also via F9). \r\n\r\n## Main functionalities\r\n\r\n- Cross-platform GUI\r\n- The GUI includes a BLE control (implemented with buttons) which allows starting and stopping the BLE advertising receiver. Advertisements are logged in their reception sequence, automatically labbelled with the MAC address.\r\n- A filter button can be used to enter a specific MAC address to restrict logging, a portion of it or a sequence of addresses, as well as BLE local names.\r\n- Logged data can be saved to file in [pickle format](https://docs.python.org/3/library/pickle.html). Archives can be subsequently reloaded and appended to the current log. They can also be inspected with `python -mpickle archive-file-name.pickle`.\r\n- Advertisement data are logged in the left panel, shown as hex bytes in the central panel and then parsed to browsable *construct* structures in the right panel.\r\n- The Python error management is wrapped into a GUI panel.\r\n- A Python shell button allows opening an inspector shell, which also provides a special *Help* with related submenu (or by pressing F9).\r\n- All panels allow a context menu (invoked with the right click of the mouse) with a number of special functions.\r\n - The left log menu panel allows renaming labels and changing MAC address. Also, by double clicking an unused area of the log panel, new frames can be added and then labelled; subsequently, a specific MAC address can be associated. Log elements can be repositioned, or deleted.\r\n - The hex editor (central panel) allows any kind of copy/paste. Sequences of bytes can be pasted [in a number of different formats](https://github.com/timrid/construct-editor/pull/17#issuecomment-1367582581). Also a special checkbox enables pasting Python expressions. Two debugging tools are also provided (invoked with the right click of the mouse after selecting a sequence of bytes), to convert bytes into a wide set of numeric forms as well as strings; these debug panels can be used to quickly check the most appropriate conversion method for a sequence of bytes.\r\n- When starting the BLE reception, a debug window is opened in background, with the possibility to control the debug level and clear the produced data.\r\n\r\n\r\nFull information, installation notes, API reference and usage details at the [construct-gallery GitHub repository](https://github.com/Ircama/construct-gallery).\r\n",
"bugtrack_url": null,
"license": "CC-BY-NC-SA-4.0",
"summary": "construct-gallery GUI (based on wxPython) and development modules",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/Ircama/construct-gallery"
},
"split_keywords": [
"construct-gallery",
"construct-editor",
"module",
"gui",
"wx",
"wxpython",
"widget",
"binary",
"editorconstruct",
"bleak",
"ble",
"bluetooth",
"plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "417eb760641349cbf2f00dfbf27f8ccf0a756ae99e09e00a9daed997ccf177d5",
"md5": "8aa60cd2f82c7ca54f80e42f723490e6",
"sha256": "ce7378fc84cbe7f6afc86d433d82ddc891ca2483c81e613642cbe14d44577906"
},
"downloads": -1,
"filename": "construct_gallery-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8aa60cd2f82c7ca54f80e42f723490e6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 35671,
"upload_time": "2023-11-21T07:33:56",
"upload_time_iso_8601": "2023-11-21T07:33:56.340398Z",
"url": "https://files.pythonhosted.org/packages/41/7e/b760641349cbf2f00dfbf27f8ccf0a756ae99e09e00a9daed997ccf177d5/construct_gallery-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cc7f6515d67eb66bee583f3cf3f8ba799d13277ae467a647c3c9f4ba4eb5526f",
"md5": "0980e732e98bcc0d2f5e918ebe634217",
"sha256": "a75cb9af98a196b3f23dfdfe74574afe907556b0a391c3549a625ff584d665cd"
},
"downloads": -1,
"filename": "construct-gallery-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "0980e732e98bcc0d2f5e918ebe634217",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 40114,
"upload_time": "2023-11-21T07:33:58",
"upload_time_iso_8601": "2023-11-21T07:33:58.347543Z",
"url": "https://files.pythonhosted.org/packages/cc/7f/6515d67eb66bee583f3cf3f8ba799d13277ae467a647c3c9f4ba4eb5526f/construct-gallery-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-21 07:33:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Ircama",
"github_project": "construct-gallery",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "construct-gallery"
}