Skip to content

Releases: lojack5/structured

3.1.0 Release

08 Oct 19:24
00e5a46
Compare
Choose a tag to compare

A new version is available:

  • Feature: typing.Self can be used as a serializable type-hint, if Self is a Structured derived class.
  • Feature: char[math.inf] and unicode[math.inf] can be used to consume all remaining bytes in a stream. These must be the final serializable type-hint in a class.
  • Feature: Conditional serialization: including Condition(condition_fn, default_value) in an Annotated[...] for a serializable typehint can be used to control whether an attribute is packed/unpacked or not. Useful for defining multiple versions of a data structured with a single class.
  • Bugfix: array can handle 0-length arrays of simple serializable types now (it could always handle complex types, simple types not supporting this was a bug).
  • Bugfix: SerializeAs now works properly when using non-default ByteOrder.

3.0.0 Release

14 Jan 21:46
Compare
Choose a tag to compare

New update with new features:

  • tuples
  • unions
  • replaced Formatted with SerializeAs
  • Full support for Python 3.11, unofficial support for Python 3.12

Plus lots of background code cleanup, and some slight performance improvements.

Deprecated features removed:

  • using serialized to configure type-hints. All additional configuration is via typing.Annotated

Install via source, or from pip:
pip install structured-classes

2.0.2 release

16 Sep 21:03
e4b7982
Compare
Choose a tag to compare

Wrapping up all the recent improvments on main.

Biggest new features include:

  • Complex data types for packing/unpacking: variable length bytes, automatically decoded strings (unicode type), and arrays of formatted or Structured types (array type).
  • Generics in Structured classes.