Skip to main content

UNKNOWN

Project description

This Python module allows to manipulate binary packed objects as classes.

Similarly to the standard library struct module, objects can be packed or unpacked.

Usage example

>>> from structclass import StructClass
>>> SomePacket = StructClass('SomePacket', '<II', ['length', 'age'])
>>> my_packet = SomePacket.unpack(b'12345678')[0]
>>> my_packet
SomePacket(length=875770417, age=943142453)
>>> my_packet.age
943142453
>>> my_packet.pack()
b'12345678'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for StructClass, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size StructClass-1.0.0.linux-x86_64.exe (64.8 kB) File type Windows Installer Python version any Upload date Hashes View
Filename, size StructClass-1.0.0.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page