Skip to main content

Python package for explicit C types

Project description

xctype

Explicit C types for Python

This is a proof of concept / work in progress for now, see roadmap.

Installation

python3 -m pip install xctype-***.whl

Known limitations

  • When two consecutive bitfields do not have the same storage (like uint32_t followed by uint16_t), offsets are wrong.

Roadmap

  • to_asciidoc
    • raw_bytes option: display values as hexstr
  • support for enums
  • support for user specified alignement
  • support for unions ?
  • better support for bitfields:
    • fix the known limitation or at least detect it and issue an error
    • optional arg to auto create padding bitfield -> may need an entirely new approach to bitfields to have a container object
  • doc: think about how to attach a doc to each member, preferably in a python/sphinx friendly way to leverage IDEs
  • replace make_struct by a decorator ?
  • think about way for user to add code to the struct to manipulate it / validate it (struct with CRCs for example)
  • replace sympy by plain python eval ? allows to size stuff based on other stuff size for example. maybe no point making this more flexible than C...
  • replace sympy with z3 ?

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

xctype-0.0.28.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

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

xctype-0.0.28-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file xctype-0.0.28.tar.gz.

File metadata

  • Download URL: xctype-0.0.28.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xctype-0.0.28.tar.gz
Algorithm Hash digest
SHA256 146eecf5d6ba9efeeba89f1c9a394b0bdd8eb28a7b516ca733cf22c80e3f5c37
MD5 bcb3e104ab24ee4bd5d4fc3e14245eff
BLAKE2b-256 5240ab2c2ba5da4b50d9a47aa3227d7e2274e64f5fd89a17b6dce834f4451a02

See more details on using hashes here.

Provenance

The following attestation bundles were made for xctype-0.0.28.tar.gz:

Publisher: python-publish.yml on sebastien-riou/xctype

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xctype-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: xctype-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xctype-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 97a50b6db56e517382cef5fe3916ce44329b236bf94922844dcd7e1c6f82f358
MD5 3acf50d317b9f1df2b4cd6be7f6355fd
BLAKE2b-256 1b2c28d422fec47ddd0bf7de3e3a5bb9b6ba39ca0d16adb6f3b7dbe5778ccc36

See more details on using hashes here.

Provenance

The following attestation bundles were made for xctype-0.0.28-py3-none-any.whl:

Publisher: python-publish.yml on sebastien-riou/xctype

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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