I am please to announce the availability of beta release 0.3.0 of the "plum-py" package.
This package provides classes and utility functions to efficiently pack and unpack bytes similar to what the standard library `struct` module offers. This package expands significantly on that capability with much more powerful and convenient access and control of bytes within a buffer (including handling variable size/type relationships within the buffer data).
The package provides a large number of fundamental types (e.g. numbers, structures, arrays, etc.) for specifying buffer data structure. Each type conforms to a "plug-and-play" architecture facilitating the ability to be combined in any way, including deeply nested structures of arbitrary type. You may also write your own custom types that conform to the "plug-and-play" architecture API and use them in combination with any of the fundamental types provided.
With Regards, Dan Gass (dan.gass at gmail)
Change List =========
- Add ``plum.items`` module for collections of typed items for data packing applications where the item structure is not predefined. - Add support to ``ByteArray`` to restrict instances to a specific size during unpacking (add ``nbytes`` parameter to ``__unpack__``). - Change ``plum.structure.Structure`` behaviors as follows: - Remove support for accepting typed items (use ``plum.items`` instead). - Block subclasses from redefining members when inheriting from a class with members already defined. - Generate ``__init__`` method only when not overridden (previously it generated ``__init__`` only if an override was not present in the new structure class, now it also checks the base classes). - Facilitate subclassing structure base class without defining members as well as subclassing a structure that has defined members. - Eliminate restrictions on mutating structures (e.g. ``append()``, ``extend()``, etc.) - Simplifications: - Remove ``cls`` argument in ``getbytes()`` function (backward incompatible change). - Eliminate need to set ``dump.cls`` in ``__pack__`` and ``__unpack__`` methods (it is now the responsibility of those calling ``add_record()`` dump method).