Skip to main content

Powerful decorator allowing the parsing of binary data into a dataclass and serializing back into raw data.

Project description

cstructs

Think struct, but on steroids.

PyPI - Version PyPI - Python Version PyPI - License status


Note: This version supercedes the original cstruct package. This is my first attempt at a test driven development cycle, so I apologize in advance if the things that I do don't make sense.

Table of Contents

Installation

python -m pip install --user -U cstructs

Features

  • Serializing
  • Deserializing
  • Inheritance between datastructs
  • Sequences
  • Allow other datastructs to be members
  • Callbacks for reading/writing
  • Individual class metadata
  • Variable length data by depending on the value of another member
  • String decoding using specified encoding format
  • Lazy sequence loading
  • Fallback(default) value for missing values
  • Handling of various types of data alignment
  • Is type checker friendly

License

cstructs is distributed under the terms of the GNU GPL v3 license.

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

cstructs-0.2.5.tar.gz (34.7 kB view details)

Uploaded Source

File details

Details for the file cstructs-0.2.5.tar.gz.

File metadata

  • Download URL: cstructs-0.2.5.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for cstructs-0.2.5.tar.gz
Algorithm Hash digest
SHA256 b55ec3f1db5f7b33d7f51364988a69958f95ec848d8bf2c0e585e130e13edfdc
MD5 56978586c0942e540dd9357a9b569a36
BLAKE2b-256 193edbd3cf8df60365523b8f6f244d95fdfe0e46584557fce4e533b8df771eb4

See more details on using hashes here.

Supported by

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