Package Info

python-cstruct


C-style structs for Python


Development/Languages/Python

Convert C struct definitions into Python classes with methods for serializing/deserializing. The usage is very simple: create a class subclassing cstruct.CStruct and add a C struct definition as a string in the struct field. The C struct definition is parsed at runtime and the struct format string is generated. The class offers the method "unpack" for deserializing a string of bytes into a Python object and the method "pack" for serializing the values into a string.


License: MIT
URL: https://github.com/andreax79/python-cstruct

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
6.1-bp160.1.2 info GA Release 2025-07-12 16.0
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python313-cstruct