pykle-serial
pykle-serial is a Python library for parsing the serialized format used on keyboard-layout-editor.com (KLE).
pykle-serial is a Python port of kle-serial, based on commit #4080386 on Dec 31, 2019 and includes Fix issue with incorrect x and y for rotated key.
Usage
import pykle_serial as kle_serial
keyboard = kle_serial.deserialize([
{'name': "Sample", 'author': "Your Name"},
["Q", "W", "E", "R", "T", "Y"]
])
# or
keyboard = kle_serial.parse('''[
{ name: "Sample", author: "Your Name" },
["Q", "W", "E", "R", "T", "Y"]
]''')
About the details of keyboard, see original kle-serial.
Noticeable differences from original kle-serial
labels/textColor/textSizeofKeyclass always have 12 elements.
JavaScript's array esoterically supports out-of-index access. Python's list doesn't.
- (implicit)
textSizeis int.
JavaScript doesn't distinguish between float and int. Python does.
Caveats
-
KLE's "Raw data" text requires additional outer
[]as JSON5. -
labelsis HTML fragment.
License
MIT license.
Metadata
Release files for pykle-serial 0.1.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 | |
|---|---|---|---|
| pykle_serial-0.1.1.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pykle_serial-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 kB
Release files / pykle_serial-0.1.1.tar.gz
| Download URL | pykle_serial-0.1.1.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b8a1e608cb71e652cfad083e43302e3d8faeedc8cc5cb7dad1024ce0e8e31ca
|
|
BLAKE2b-256 checksum How to use checksums |
b97523d9dd724cf0f84039918e6f06e7a84129ce4ae0d74848b5b9708edbe560
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.5
|
Release files / pykle_serial-0.1.1-py3-none-any.whl
| Download URL | pykle_serial-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25afe6a382acb275bab2a890d2bb9b6a3135da50a62c83b68b10fe85180d2c8e
|
|
BLAKE2b-256 checksum How to use checksums |
51a6bf1dd6afbabcaf5b19329a1899168c0391d82e99f0cba28db2da1614907b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.5
|