Skip to main content

VIA api implementation for QMK-based keyboards

Project description

qmk-via-api

Version image image

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;

const PRODUCT_VID: u16 = 0x594D;
const PRODUCT_PID: u16 = 0x604D;
const USAGE_PAGE: u16 = 0xff60;

fn main() {
    let api = KeyboardApi::new(PRODUCT_VID, PRODUCT_PID, USAGE_PAGE).unwrap();
    println!("Protocol version: {:?}", api.get_protocol_version());
    println!("Layer count: {:?}", api.get_layer_count());
}

Python

Install with pip:

pip install qmk-via-api

Usage example:

import qmk_via_api

PRODUCT_VID = 0x594D
PRODUCT_PID = 0x604D
USAGE_PAGE = 0xff60

if __name__ == "__main__":
    api = qmk_via_api.KeyboardApi(PRODUCT_VID, PRODUCT_PID, USAGE_PAGE)
    print(f"Protocol version {api.get_protocol_version()}")
    print(f"Layers count: {api.get_layer_count()}")

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmk_via_api-0.2.0.tar.gz (30.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qmk_via_api-0.2.0-cp38-abi3-win_amd64.whl (203.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

qmk_via_api-0.2.0-cp38-abi3-win32.whl (185.9 kB view details)

Uploaded CPython 3.8+Windows x86

qmk_via_api-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl (410.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ x86-64

qmk_via_api-0.2.0-cp38-abi3-macosx_11_0_arm64.whl (299.2 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

qmk_via_api-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl (303.3 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file qmk_via_api-0.2.0.tar.gz.

File metadata

  • Download URL: qmk_via_api-0.2.0.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for qmk_via_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a59ed439c27104012a86c0e518e29dcacd689ffaef950b941e5ec21a4b4fab0c
MD5 3e708aa64ce912ff635a4ecbfe4460df
BLAKE2b-256 d42d96d9b200480743903b94b49033151a48c31cd242fa6ffb12174bc61f3421

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.2.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.2.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c09aced4ff9170e627d462edd96e1b50fae9cd06309cc665e939868f4ca82605
MD5 56fec3a95607258e2e81285b57230d1d
BLAKE2b-256 0b5086b0f092c13c66284a717d92167431027d50c05b8f1e3bca6459e4481f93

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.2.0-cp38-abi3-win32.whl.

File metadata

  • Download URL: qmk_via_api-0.2.0-cp38-abi3-win32.whl
  • Upload date:
  • Size: 185.9 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for qmk_via_api-0.2.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 4c3ac9eecefa535b67a82180c86a4eeef7ae9a2ee8697fba8af2a3f4e180742a
MD5 6a96faa5b4ed951467ac0bc19d5bb330
BLAKE2b-256 ddf56e00d16521ec8ed0be67f1bd3461d7d4643138e056776c314731498a0c37

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.2.0-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 565ce0deabad1c8e68a655f0f8a58e5fdb4af362d42e5e5ea18ac0674483e441
MD5 73ef4e3db22d51f0f85b183b44899201
BLAKE2b-256 8e492aa52bb9952516e4c1030be95a2dee19e3823ddb3345da98e4dd46de106b

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.2.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 868c506523e89ed24cecbeb67b1d5b97a8c2527823c110acf666060d613f3a5f
MD5 f7821dfded4aa9eff60af1036fbbd9d4
BLAKE2b-256 05174d433fa4cd2415646ba6373419ba2232eed7ca0e06c1de82942f272768a9

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 52e20997344c58716a79fcd515318fde7f4e13305c8cba9c0967c63040e1ecde
MD5 79fad93984ebab1ec91623cd89b02702
BLAKE2b-256 b619b72c66154058cdfe37ae868b1e57e0ffc915897f3de0499e44e8fb9a3cec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page