Skip to main content

C-style structs for Python

Project description

Convert C struct definitions into Python classes with methods for serializing/deserializing.

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.

https://github.com/andreax79/python-cstruct

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

cstruct-1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cstruct-1.0-py3.3.egg (19.5 kB view details)

Uploaded Egg

cstruct-1.0-py3.2.egg (19.3 kB view details)

Uploaded Egg

cstruct-1.0-py3.1.egg (19.1 kB view details)

Uploaded Egg

cstruct-1.0-py2.7.egg (18.8 kB view details)

Uploaded Egg

cstruct-1.0-py2.6.egg (18.9 kB view details)

Uploaded Egg

cstruct-1.0-py2.5.egg (18.9 kB view details)

Uploaded Egg

cstruct-1.0-py2.4.egg (19.0 kB view details)

Uploaded Egg

File details

Details for the file cstruct-1.0.tar.gz.

File metadata

  • Download URL: cstruct-1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0.tar.gz
Algorithm Hash digest
SHA256 fae1a278d154667f567e74506d936a665ae09a4f0f507142f8207d8e31387a6f
MD5 b12c1f3718875cafd52bc9222bd21dd5
BLAKE2b-256 942e885941e40016ca8e0a7ee3ca98bc5689afac1da155789ab495e714fa4e54

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py3.3.egg.

File metadata

  • Download URL: cstruct-1.0-py3.3.egg
  • Upload date:
  • Size: 19.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py3.3.egg
Algorithm Hash digest
SHA256 e8853134dfb028ef6916cb75ce9e07d9419e790e3676db46215b01675a415a74
MD5 01ea1ba4fa688cd8284e76432dfad18c
BLAKE2b-256 4908cbf3813254a1dc3b43877c3284f4cc32963846074297858e8b8f32f47fc3

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py3.2.egg.

File metadata

  • Download URL: cstruct-1.0-py3.2.egg
  • Upload date:
  • Size: 19.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py3.2.egg
Algorithm Hash digest
SHA256 a99f9bbf8c792008cd33b7b3cac38f9758d7bc8f370eae5157d73ee17b359d4b
MD5 f6ee9a178d419086b12a78fe2f0ae269
BLAKE2b-256 666a3583d20b20133d1df54710372e1b8b1cadba53279ffa43a15f905ad081f9

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py3.1.egg.

File metadata

  • Download URL: cstruct-1.0-py3.1.egg
  • Upload date:
  • Size: 19.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py3.1.egg
Algorithm Hash digest
SHA256 acc7e09505c2d69bdcab334813f2a18c401773c7fc5f9ba48f1b450f386a1a9b
MD5 774a97d843affdc768eb1d06380c1f50
BLAKE2b-256 9560e2243c1151a15148f83aecaad31455aed706badafc475b98ecebe13a0620

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py2.7.egg.

File metadata

  • Download URL: cstruct-1.0-py2.7.egg
  • Upload date:
  • Size: 18.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py2.7.egg
Algorithm Hash digest
SHA256 3120fef6a5c46acf38f85d83168918d9b93a44ed17cbabb3f48cfa4dfd5371a3
MD5 1722614f2e773a0f23abdbfc1e86476b
BLAKE2b-256 97cff709fe97a908bb9e7395202cf25c62167df8ddd46bb800a0a5a961cb9241

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py2.6.egg.

File metadata

  • Download URL: cstruct-1.0-py2.6.egg
  • Upload date:
  • Size: 18.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py2.6.egg
Algorithm Hash digest
SHA256 708ef28776cafa3f9c73aae23b642f28ed376186ba967870ab05e4cff4e37541
MD5 e8b6e93c1796ca32baf8bfca0e853a54
BLAKE2b-256 d8bc56e753af8b41bc9c681ec13a94e73993efe0ddc1db7bd2f572c34036ac9f

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py2.5.egg.

File metadata

  • Download URL: cstruct-1.0-py2.5.egg
  • Upload date:
  • Size: 18.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py2.5.egg
Algorithm Hash digest
SHA256 7e6f47b33341c8958770a0c3d4242211149b013e9152401d5d68240a4de62bfd
MD5 3f79cc39324b0595a0090a9e845d43c8
BLAKE2b-256 668b9bfca424048e4a013055b034cfa5416a3919b6caf3c5be3d8042e99e11e2

See more details on using hashes here.

File details

Details for the file cstruct-1.0-py2.4.egg.

File metadata

  • Download URL: cstruct-1.0-py2.4.egg
  • Upload date:
  • Size: 19.0 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cstruct-1.0-py2.4.egg
Algorithm Hash digest
SHA256 eddbd28d805a52286c9f66554623fd0e1b732293b9cec21d217064a9c19e2b26
MD5 7d0e552bea3cfe1449f1718c45cd707c
BLAKE2b-256 550bccc0d0841067c9a205e6ab3fa5e6c7ea556a2e8c22f222c867382429aba8

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