qmk-via-api
qmk-via-api provides an implementation of the VIA API for QMK (Quantum Mechanical Keyboard) based keyboards. It allows developers to interact with QMK keyboards programmatically, enabling tasks such as configuring keymaps, macros, lighting effects and more.
Additionally, this library includes Python bindings for all API calls for integration of QMK keyboard configuration into Python-based applications or scripts.
Usage
Rust
Add dependency with Cargo:
cargo add qmk-via-api
Usage example:
use qmk_via_api::{
api::KeyboardApi,
scan::scan_keyboards,
};
fn main() -> Result<(), qmk_via_api::Error> {
let devices = scan_keyboards()?;
let dev = match devices.first() {
Some(dev) => dev,
None => {
println!("No devices found");
return Ok(());
}
};
let api = KeyboardApi::from_device(dev)?;
println!("Protocol version: {:?}", api.get_protocol_version()?);
println!("Layer count: {:?}", api.get_layer_count()?);
let original = api.get_key(0, 0, 0)?;
api.set_key(0, 0, 0, original)?;
Ok(())
}
Python
Install with pip:
pip install qmk-via-api
Usage example:
import qmk_via_api
from qmk_via_api import scan_keyboards
devices = scan_keyboards()
if not devices:
print("No devices found")
raise SystemExit(0)
dev = devices[0]
api = qmk_via_api.KeyboardApi.from_device(dev)
print(f"Protocol version {api.get_protocol_version()}")
print(f"Layers count: {api.get_layer_count()}")
original = api.get_key(0, 0, 0)
api.set_key(0, 0, 0, original)
License & Attribution
Parts of this project are based on code from the VIA project, which is licensed under the GNU General Public License v3.0.
Metadata
Release files for qmk-via-api 0.10.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 |
|---|---|---|---|---|
| qmk_via_api-0.10.1.tar.gz | 42.3 kB | Without provenance | Details for qmk_via_api-0.10.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| qmk_via_api-0.10.1-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for qmk_via_api-0.10.1-cp38-abi3-win_amd64.whl |
| qmk_via_api-0.10.1-cp38-abi3-win32.whl | CPython 3.8 | abi3 | Windows x86-32 | Details for qmk_via_api-0.10.1-cp38-abi3-win32.whl |
| qmk_via_api-0.10.1-cp38-abi3-manylinux_2_38_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.38+ x86-64 | Details for qmk_via_api-0.10.1-cp38-abi3-manylinux_2_38_x86_64.whl |
| qmk_via_api-0.10.1-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for qmk_via_api-0.10.1-cp38-abi3-macosx_11_0_arm64.whl |
| qmk_via_api-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for qmk_via_api-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 2.1 MB
Release files / qmk_via_api-0.10.1.tar.gz
| Download URL | qmk_via_api-0.10.1.tar.gz |
|---|---|
| Size | 42.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d92a6e5e4ecab0c9cb87a41adf0048c6eb5741068da1de80df3ba78888dad1d9
|
|
BLAKE2b-256 checksum How to use checksums |
8021a7f039e4c401e9347088fd12f8f68bfc5238d834b3d2f33ead7a9780e6d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / qmk_via_api-0.10.1-cp38-abi3-win_amd64.whl
| Download URL | qmk_via_api-0.10.1-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 303.0 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bad9c2829ffa7e94ea8162dbfa8e505ff23aea88714e69a2e0fbc8d39b2af2bd
|
|
BLAKE2b-256 checksum How to use checksums |
afd68576b900354184da03fee9e7dd13f4808c080bcc3f0c373eec33fb493bd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / qmk_via_api-0.10.1-cp38-abi3-win32.whl
| Download URL | qmk_via_api-0.10.1-cp38-abi3-win32.whl |
|---|---|
| Size | 271.6 kB |
| Tags | CPython 3.8 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
fe4e8fe18cfcf5de89326724a249883f1cb7d265bbea0fad5f9f41cbeefc3385
|
|
BLAKE2b-256 checksum How to use checksums |
beb0c9d3d0d20b361802bbc858de9a5db37b4db12f114462c8b1f26327fd8c0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / qmk_via_api-0.10.1-cp38-abi3-manylinux_2_38_x86_64.whl
| Download URL | qmk_via_api-0.10.1-cp38-abi3-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 598.4 kB |
| Tags | CPython 3.8 Linux glibc 2.38+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8b129ceb9f68827e09ab4cfe1ed7d3033d5ab49bed09a427b552f401a6951832
|
|
BLAKE2b-256 checksum How to use checksums |
3f89ce988959b1d093748435a156fb9224cb8c7214f1a908637f972619ac7547
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / qmk_via_api-0.10.1-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | qmk_via_api-0.10.1-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 435.5 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
fcb0653a2d48c4e90317ba17308ac806fb7e30f479609209911904c063554381
|
|
BLAKE2b-256 checksum How to use checksums |
ed923015d00be28f04503bd5e17ecab0f1adfc1e96981d82626d3d552d823011
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Release files / qmk_via_api-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | qmk_via_api-0.10.1-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 424.6 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9dfd1cb4dc9bd344d95f87e4adde9048812640966d35e0d0392dd2369583f568
|
|
BLAKE2b-256 checksum How to use checksums |
de098c21d588c33237532651908a7ef1d56a95c5f893b306f93895a7be6869fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.15.0
|
Security for qmk-via-api 0.10.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.