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.

Source Distribution

StructClass-1.0.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

StructClass-1.0.1.linux-x86_64.exe (64.8 kB view details)

Uploaded Source

File details

Details for the file StructClass-1.0.1.tar.gz.

File metadata

  • Download URL: StructClass-1.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for StructClass-1.0.1.tar.gz
Algorithm Hash digest
SHA256 502d9addd29acd75e19f6458c06712070c6721aef6a170dd655c98a2991edac1
MD5 17b1711a1e16581d06159ad2051b9413
BLAKE2b-256 f08103043cd455b3972ffb7652b35a9ef4377d646638f3dff649cf1085335671

See more details on using hashes here.

File details

Details for the file StructClass-1.0.1.linux-x86_64.exe.

File metadata

File hashes

Hashes for StructClass-1.0.1.linux-x86_64.exe
Algorithm Hash digest
SHA256 c021c66de5fab795f8fe2cd7a5c0d91badcf4f5515289a8592cc67dbe500a0e4
MD5 a007d8d8e0986e2ee145f3819936b08a
BLAKE2b-256 b03dc1ed9264e75d158136034b796a34f1c77f67faf13e8298b2b234275c2cd9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page