[plum] API Reference

Plum Types

Module Description
plum.array list of uniformly typed
plum.bytearray array of bytes
plum.float floating point
plum.int integer
plum.int.bitfields integer with bit field accessors
plum.int.enum integer enumerated constants
plum.int.flag integer with bit flags
plum.ipv4 IPV4 address
plum.items collection of uniquely typed items
plum.nil no bytes
plum.str string
plum.structure predefined structure of uniquely typed members

Utility Functions

Function Description
getbytes() Get bytes from bytes buffer.
pack() Pack values as bytes following a format.
pack_and_dump() Pack values as bytes and produce bytes summary following a format.
pack_into() Pack values as bytes into a buffer following a format.
pack_into_and_dump() Pack values as bytes into a buffer following a format and produce bytes summary.
unpack() Unpack item(s) from bytes.
unpack_and_dump() Unpack item(s) from bytes and produce packed bytes summary.
unpack_from() Unpack item(s) from within a bytes buffer.
unpack_from_and_dump() Unpack item(s) from within a bytes buffer and produce packed bytes summary.

Exceptions

  • ExcessMemoryError
  • InsufficientMemoryError
  • PackError
  • SizeError
  • UnpackError