A Python library for interacting with KLE data structures and files.
Project description
kle-py
A Python library for interacting with KLE data structures and KLE JSON files.
Originally ported from keyboard-layout-editor with improvements to make the source code increasingly portable across different language platforms.
Table of Contents
Documentation
To view documentation, examples, visit the documentation site.
Installation
To install and use the library, use the installation method listed below.
pip3 install damsenviet.kle
Quick Start
This quick start demo demonstrates parsing a KLE JSON file.
import os
import json
from damsenviet.kle import Keyboard
# relative to this file
json_relative_file_path = "./keyboard.json"
json_absolute_file_path = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
json_relative_file_path,
)
)
keyboard = Keyboard.from_json(
json.load(json_absolute_file_path)
)
for key in keyboard.keys:
for label in key.labels:
pass
The schemas for KLE JSON can be found at kle-json.
Contributing
There are many ways to contribute to this project.
For more information please see the contributing guidelines.
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
File details
Details for the file damsenviet.kle-1.0.1.tar.gz.
File metadata
- Download URL: damsenviet.kle-1.0.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cfe1cd706c2585a59c04227ae46c08ca259be121df22dcd98bff3d7cb9a4ea8
|
|
| MD5 |
4248502c7e818fc54508bbd848f8764d
|
|
| BLAKE2b-256 |
e1c8fd7527d3907e9cfabe189f1624649a2c28d6f1849b2099e4e9377b6b6316
|