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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xctype-0.0.18.tar.gz.
File metadata
- Download URL: xctype-0.0.18.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9c044d47949230e277caee599bcd4556f5bf63c280ca218791eb532799d35d6
|
|
| MD5 |
be1814e4784cc021d0b557e855872348
|
|
| BLAKE2b-256 |
dbc37898dec91e7dc1e28845ddcf72ef2ee67f36271f34efc449bf7b199c13f3
|
Provenance
The following attestation bundles were made for xctype-0.0.18.tar.gz:
Publisher:
python-publish.yml on sebastien-riou/xctype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xctype-0.0.18.tar.gz -
Subject digest:
a9c044d47949230e277caee599bcd4556f5bf63c280ca218791eb532799d35d6 - Sigstore transparency entry: 200789594
- Sigstore integration time:
-
Permalink:
sebastien-riou/xctype@d292f55a774cddc8ead274a9a6f5e46faf492b8f -
Branch / Tag:
refs/tags/v0.0.18 - Owner: https://github.com/sebastien-riou
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d292f55a774cddc8ead274a9a6f5e46faf492b8f -
Trigger Event:
release
-
Statement type:
File details
Details for the file xctype-0.0.18-py3-none-any.whl.
File metadata
- Download URL: xctype-0.0.18-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca28630a0f3b1ac7a83b9c3742448754e0f9e224eef9d9242fe5681137ce3a35
|
|
| MD5 |
34b084c9b921ffea062f8440ea218b00
|
|
| BLAKE2b-256 |
ae048cad835c9499c70623ffa2e1cc45ab3a22ea513230ff5b36b66bcf477117
|
Provenance
The following attestation bundles were made for xctype-0.0.18-py3-none-any.whl:
Publisher:
python-publish.yml on sebastien-riou/xctype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xctype-0.0.18-py3-none-any.whl -
Subject digest:
ca28630a0f3b1ac7a83b9c3742448754e0f9e224eef9d9242fe5681137ce3a35 - Sigstore transparency entry: 200789596
- Sigstore integration time:
-
Permalink:
sebastien-riou/xctype@d292f55a774cddc8ead274a9a6f5e46faf492b8f -
Branch / Tag:
refs/tags/v0.0.18 - Owner: https://github.com/sebastien-riou
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d292f55a774cddc8ead274a9a6f5e46faf492b8f -
Trigger Event:
release
-
Statement type: