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 bu 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.17.tar.gz (22.1 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.17-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xctype-0.0.17.tar.gz
Algorithm Hash digest
SHA256 2733adfc439166e70a392c13dcd024fffe0fac99703b6a0a406b905b7d989e87
MD5 c29bfb03b5f30438d0e02912a5f615c6
BLAKE2b-256 86cb2520dd7f92304f92b7432a67e9ec80f5f7bf39dcc1a55a8c9fdfda2e1661

See more details on using hashes here.

Provenance

The following attestation bundles were made for xctype-0.0.17.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.17-py3-none-any.whl.

File metadata

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

File hashes

Hashes for xctype-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 7c00abe9b7ab3cc1451452920774267c402b9341e4cdee80ee16fe0e920c9e86
MD5 eba6f147d70b6312e100e90491ccae0f
BLAKE2b-256 deb95880f589e3c7c092ad891750deb3cf1b7458ac7bd4a59b88957d6dd0ade3

See more details on using hashes here.

Provenance

The following attestation bundles were made for xctype-0.0.17-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