struct-parse
struct_parse builds on the struct_ module in the standard library.
struct lets you parse buffers by describing the format similarly to C struct
definitions. struct_parse aims to comply with the struct module's format
strings, but instead returns a (very flat) abstract syntax tree (AST).
Example
.. code-block:: python
import struct_parse
field_list = struct_parse.parse('hhl') print(field_list.fields)
This will print::
[<FieldType.FLOAT: 16>, <FieldType.FLOAT: 16>, <FieldType.LONG: 9>]
Use cases
For simply unpacking packed binary data, the struct module does the trick.
The goal of this module is to enable the user to do other stuff with the format
string--we return a sequence of types instead of a sequence of values.
Compatibility
This library supports only Python 3.
.. _struct: https://docs.python.org/3/library/struct.html
Metadata
Release files for struct-parse 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| struct_parse-0.0.2.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| struct_parse-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / struct_parse-0.0.2.tar.gz
| Download URL | struct_parse-0.0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a867c2cadb28bd101fb1f918587c264d5814d937b17b482e37e1e50b7917c7db
|
|
BLAKE2b-256 checksum How to use checksums |
dc521eb184a5c2395e33b007411634d6db7fbf6742dab859886754018d7e8b67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.2
|
Release files / struct_parse-0.0.2-py3-none-any.whl
| Download URL | struct_parse-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fa2043a222734929afa22b31ffa350ac44b1132eec1254302b9765dfef19dee
|
|
BLAKE2b-256 checksum How to use checksums |
6817f89d87fde91d382ef5d0ede347dff0e44f43a783ac46837a83d00c7e16bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.2
|
Security for struct-parse 0.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.