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 ?
Release files for xctype 0.0.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xctype-0.0.30.tar.gz | 33.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xctype-0.0.30-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.2 kB
Release files / xctype-0.0.30.tar.gz
| Download URL | xctype-0.0.30.tar.gz |
|---|---|
| Size | 33.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e2986ab73f93344c73fb759ca9066db11641dca0c7aaa04bf5ac2adbfb2b113
|
|
BLAKE2b-256 checksum How to use checksums |
fce050ffb25e0c2ae7b1e53d7d0fe59904a9ad28951992f74e80d6666deb8542
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / xctype-0.0.30-py3-none-any.whl
| Download URL | xctype-0.0.30-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dabf0ca64bad5eb1c99f2a8169807ab41f85dccd892120e9230fe4879a6fba29
|
|
BLAKE2b-256 checksum How to use checksums |
74888d9fafa1620baae52605f891a0bf3dcf572fedbdee009dc2c92de19d8b7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log