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.12.tar.gz (21.4 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.12-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xctype-0.0.12.tar.gz
  • Upload date:
  • Size: 21.4 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.12.tar.gz
Algorithm Hash digest
SHA256 ff7699ba6ada4d844d9f1499c01f9cc98d0819bbb5f6be4939a1d0351cee3252
MD5 1937fbca7412ac083910342462645c78
BLAKE2b-256 35b98b7020c919aed5908cd3f90e020a81fe60fb58ae61604b1cf80eb5fb8c71

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: xctype-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 2e4a704b3e1858f987030fbb4a95497c4138aac2182570a8e925e2f1f92f6c08
MD5 7928a46853aea0c4ac441dfab9cc1050
BLAKE2b-256 3868f0fc369315564b0ac32830c9662cd93904c3e82786484e4e84252a2e72f3

See more details on using hashes here.

Provenance

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