dlestxetx: DLE/STX/ETX packet encoder/decoder
DLE/STX/ETX is a packet framing algorithm, used by some devices (such as Metlink LED passenger information displays) to transmit data as packets over a serial medium. This algorithm delimits data using DLE, STX, and ETX control codes.
Packets begin with a DLE STX sequence, follow with a byte-stuffed data stream (all DLE bytes in the data are conveyed as DLE DLE), and end with a DLE ETX sequence.
The dlestxetx module provides functions to encode data into packets:
>>> from dlestxetx import encode >>> encode(b'\x01\x10\x05') b'\x10\x02\x01\x10\x10\x05\x10\x03'
decode packets into data:
>>> from dlestxetx import decode >>> decode(b'\x10\x02\x01\x10\x10\x05\x10\x03') b'\x01\x10\x05'
and read packets directly from file objects:
>>> from dlestxetx import read >>> packets = BytesIO(encode(b'\x04\x05\x06') + encode(b'\x07\x08\x09')) >>> read(packets) b'\x04\x05\x06' >>> read(packets) b'\x07\x08\x09'
Installation
Install this module from PyPI using pip:
pip install dlestxetx
Changes
- 1.0.1
Add support for Python 3.5.
- 1.0.0
Initial release.
Contribute
Source code: https://github.com/Lx/python-dlestxetx
Support
Issue tracker: https://github.com/Lx/python-dlestxetx/issues
License
This project is licensed under the MIT License.
Metadata
Release files for dlestxetx 1.0.1
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 | Actions |
|---|---|---|---|---|
| dlestxetx-1.0.1.tar.gz | 4.2 kB | Without provenance | Details for dlestxetx-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dlestxetx-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for dlestxetx-1.0.1-py3-none-any.whl |
Total release size: 8.6 kB
Release files / dlestxetx-1.0.1.tar.gz
| Download URL | dlestxetx-1.0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d639fbcb94ac36320ffe833829c8eb9201a959124c849f9fff91c3cd44d04fd2
|
|
BLAKE2b-256 checksum How to use checksums |
25be04fce66ae06665567ba7cc831db31415c39258d935c687941495b223e51c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / dlestxetx-1.0.1-py3-none-any.whl
| Download URL | dlestxetx-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
711c8de64ded4442203acc6181bdb0362434274aa8bd4079f65fb5a493f35294
|
|
BLAKE2b-256 checksum How to use checksums |
5211a3faee518484baa41895fc6de0501d77c1a51993b0ffebccbf4eac6d45fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for dlestxetx 1.0.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.