{"id":19168442,"url":"https://github.com/srwi/qmk-via-api","last_synced_at":"2025-05-07T14:41:58.328Z","repository":{"id":229517895,"uuid":"751567285","full_name":"srwi/qmk-via-api","owner":"srwi","description":"VIA api implementation for QMK-based keyboards","archived":false,"fork":false,"pushed_at":"2025-03-22T19:53:02.000Z","size":91,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T05:08:26.519Z","etag":null,"topics":["keyboard-firmware","python","qmk","rust","via"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srwi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-01T21:30:27.000Z","updated_at":"2025-03-22T19:48:17.000Z","dependencies_parsed_at":"2024-03-24T22:26:48.168Z","dependency_job_id":"7a10dd4b-4014-4a33-953b-71d2ff4a8d9c","html_url":"https://github.com/srwi/qmk-via-api","commit_stats":null,"previous_names":["srwi/rust-via-api","srwi/qmk-via-api"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srwi%2Fqmk-via-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srwi%2Fqmk-via-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srwi%2Fqmk-via-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srwi%2Fqmk-via-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srwi","download_url":"https://codeload.github.com/srwi/qmk-via-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897455,"owners_count":21821439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keyboard-firmware","python","qmk","rust","via"],"created_at":"2024-11-09T09:42:40.754Z","updated_at":"2025-05-07T14:41:58.291Z","avatar_url":"https://github.com/srwi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qmk-via-api\n\n[![Version](https://img.shields.io/crates/v/qmk-via-api.svg)](https://crates.io/crates/qmk-via-api)\n[![image](https://img.shields.io/pypi/v/qmk-via-api.svg)](https://pypi.python.org/pypi/qmk-via-api)\n[![image](https://img.shields.io/pypi/l/qmk-via-api.svg)](https://pypi.python.org/pypi/qmk-via-api)\n\n`qmk-via-api` provides an implementation of the [VIA](https://www.caniusevia.com/docs/specification) API for [QMK](https://github.com/qmk/qmk_firmware) (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.\n\nAdditionally, this library includes Python bindings for all API calls for integration of QMK keyboard configuration into Python-based applications or scripts.\n\n# Usage\n\n## Rust\n\nAdd dependency with Cargo:\n\n```bash\ncargo add qmk-via-api\n```\n\nUsage example:\n\n```rust\nuse qmk_via_api::api::KeyboardApi;\n\nconst PRODUCT_VID: u16 = 0x594D;\nconst PRODUCT_PID: u16 = 0x604D;\nconst USAGE_PAGE: u16 = 0xff60;\n\nfn main() {\n    let api = KeyboardApi::new(PRODUCT_VID, PRODUCT_PID, USAGE_PAGE).unwrap();\n    println!(\"Protocol version: {:?}\", api.get_protocol_version());\n    println!(\"Layer count: {:?}\", api.get_layer_count());\n}\n```\n\n## Python\n\nInstall with pip:\n\n```bash\npip install qmk-via-api\n```\n\nUsage example:\n\n```python\nimport qmk_via_api\n\nPRODUCT_VID = 0x594D\nPRODUCT_PID = 0x604D\nUSAGE_PAGE = 0xff60\n\nif __name__ == \"__main__\":\n    api = qmk_via_api.KeyboardApi(PRODUCT_VID, PRODUCT_PID, USAGE_PAGE)\n    print(f\"Protocol version {api.get_protocol_version()}\")\n    print(f\"Layers count: {api.get_layer_count()}\")\n```\n\n# License \u0026 Attribution\n\nParts of this project are based on code from [the VIA project](https://github.com/the-via/app), which is licensed under the GNU General Public License v3.0.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrwi%2Fqmk-via-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrwi%2Fqmk-via-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrwi%2Fqmk-via-api/lists"}