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.1.tar.gz (30.9 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.1-cp38-abi3-win_amd64.whl (204.4 kB view details)

Uploaded CPython 3.8+Windows x86-64

qmk_via_api-0.2.1-cp38-abi3-win32.whl (186.8 kB view details)

Uploaded CPython 3.8+Windows x86

qmk_via_api-0.2.1-cp38-abi3-manylinux_2_34_x86_64.whl (453.9 kB view details)

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

qmk_via_api-0.2.1-cp38-abi3-macosx_11_0_arm64.whl (303.9 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

qmk_via_api-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl (307.4 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for qmk_via_api-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0093350e7992fe3c86003f723cc0e37f4c9ec7825ebb597a67b1209c33630c5a
MD5 e8348d6e5f3e431588c2081ebcd0f7bf
BLAKE2b-256 7441bcfc38c4039b16766da9280fee7539708b376f4c50a4bf51e055f3d0aa2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qmk_via_api-0.2.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3298a6d80cf0e2ffeace5bbf2ff6557a6036af516c5ed262086572895794cefe
MD5 214af3381a36f70e78694c2f156e64c2
BLAKE2b-256 04840bb7acd3cf662d2308e44f0dd62ebf3c12192da5bcd8612263df098407c0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qmk_via_api-0.2.1-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 85a7cfcc5ea42b652b6083c17ccf9eeeeee4f54403e4fc4e5d7c6ceee8f6430c
MD5 855dfb199ed1d90e340fe965cbffc108
BLAKE2b-256 486928d2e15457babae8442e66392f43fe9cb64c003a888f07e72b7b940a8b5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qmk_via_api-0.2.1-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 231a800811a8f53fcf62984192a6915577d8135ed6086f2a6b673d7afd372018
MD5 d79c97b7eac380c686700345d9ce5ff5
BLAKE2b-256 65732adcb9db8bdf01283dfad5c9e2a73605e5a0cfc865af91d93f61b5a97069

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qmk_via_api-0.2.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e0b314507e7dfd24fc88079771f24f59a1c06a6fa472e760f8a4f7e8fb4a01c
MD5 6539a75688575d1b1a08a4bd704df3eb
BLAKE2b-256 286cab51cef5c4dad301682430898e5b8f9b3e6f6748737a645827c35b758847

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qmk_via_api-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b6f0d3115b2dba6e9c13d227bc317b256714ab48ce3ea33758ac0052077fc30a
MD5 799154bce7a0923233a20e6df5b2779c
BLAKE2b-256 3efcd2e9ad861d3d8165cade0c7b2c36c1b1c3b44452db09e1eec0d5d2757166

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