| Name | DisplayPad JSON |
| Version |
1.0.3
JSON |
| download |
| home_page | https://sytxlabs.eu |
| Summary | This library allows you to customize your own Mountain DisplayPad by assigning each button its own custom function, image or color. |
| upload_time | 2024-10-19 02:35:01 |
| maintainer | None |
| docs_url | None |
| author | Sytxlabs |
| requires_python | >=3.10 |
| license | MIT license |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
hidapi
pyee
Pillow
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# DisplayPad
This library allows you to customize your own Mountain DisplayPad by assigning each button its own custom function, image or color.
# Example
```python
import asyncio
from displaypad import DisplayPad
async def main():
# Create a new DisplayPad instance
pad = DisplayPad.DisplayPad()
# Define event handlers
@pad.on('down')
def on_key_down(key_index):
print(f"Key {key_index} has been pressed.")
# Define event handlers
@pad.on('up')
def on_key_down(key_index):
print(f"Key {key_index} has been released.")
# Define event handlers
@pad.on('error')
def on_error(error):
print(f"Error: {error}")
# Clear all keys
pad.clear_all_keys()
# Set the first three keys to red, green and blue
pad.set_key_color(0, 255, 0, 0)
pad.set_key_color(1, 0, 255, 0)
pad.set_key_color(2, 0, 0, 255)
# Keep the script running
while True:
await asyncio.sleep(1)
if __name__ == "__main__":
# Run the main function
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": "https://sytxlabs.eu",
"name": "DisplayPad",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Sytxlabs",
"author_email": "Sytxlabs <info@sytxlabs.eu>",
"download_url": "https://files.pythonhosted.org/packages/42/ac/043372e545d08c74e899750af64cdc050c5fa87f7a26879c1035371de070/displaypad-1.0.3.tar.gz",
"platform": null,
"description": "# DisplayPad\nThis library allows you to customize your own Mountain DisplayPad by assigning each button its own custom function, image or color.\n\n# Example\n\n```python\nimport asyncio\n\nfrom displaypad import DisplayPad\n\n\nasync def main():\n # Create a new DisplayPad instance\n pad = DisplayPad.DisplayPad()\n\n # Define event handlers\n @pad.on('down')\n def on_key_down(key_index):\n print(f\"Key {key_index} has been pressed.\")\n\n # Define event handlers\n @pad.on('up')\n def on_key_down(key_index):\n print(f\"Key {key_index} has been released.\")\n\n # Define event handlers\n @pad.on('error')\n def on_error(error):\n print(f\"Error: {error}\")\n\n # Clear all keys\n pad.clear_all_keys()\n\n # Set the first three keys to red, green and blue\n pad.set_key_color(0, 255, 0, 0)\n pad.set_key_color(1, 0, 255, 0)\n pad.set_key_color(2, 0, 0, 255)\n\n # Keep the script running\n while True:\n await asyncio.sleep(1)\n\nif __name__ == \"__main__\":\n # Run the main function\n asyncio.run(main())\n```\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "This library allows you to customize your own Mountain DisplayPad by assigning each button its own custom function, image or color.",
"version": "1.0.3",
"project_urls": {
"GitHub": "https://github.com/SytxLabs/DisplayPad",
"Homepage": "https://sytxlabs.eu"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "06d2ec33a09b9649b042c0f0186c6c752f672cbbeeced517442dca571d9d4547",
"md5": "71200c8b7a22bd3ae2d459f32beafca4",
"sha256": "75f65326a3468b70b0d455e8a9d1a964f6e1d747c76a615971442bb009ddce33"
},
"downloads": -1,
"filename": "DisplayPad-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "71200c8b7a22bd3ae2d459f32beafca4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 4880,
"upload_time": "2024-10-19T02:34:59",
"upload_time_iso_8601": "2024-10-19T02:34:59.989775Z",
"url": "https://files.pythonhosted.org/packages/06/d2/ec33a09b9649b042c0f0186c6c752f672cbbeeced517442dca571d9d4547/DisplayPad-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42ac043372e545d08c74e899750af64cdc050c5fa87f7a26879c1035371de070",
"md5": "50c5aa64262f7b7dd0905a4563e3bcc9",
"sha256": "333211bb253bb33c32d9171ec859641c9b5ce883b6cdd07269680fa09993866f"
},
"downloads": -1,
"filename": "displaypad-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "50c5aa64262f7b7dd0905a4563e3bcc9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4614,
"upload_time": "2024-10-19T02:35:01",
"upload_time_iso_8601": "2024-10-19T02:35:01.358426Z",
"url": "https://files.pythonhosted.org/packages/42/ac/043372e545d08c74e899750af64cdc050c5fa87f7a26879c1035371de070/displaypad-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-19 02:35:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SytxLabs",
"github_project": "DisplayPad",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "hidapi",
"specs": [
[
"==",
"0.14.0.post2"
]
]
},
{
"name": "pyee",
"specs": [
[
"==",
"12.0.0"
]
]
},
{
"name": "Pillow",
"specs": [
[
"==",
"11.0.0"
]
]
}
],
"lcname": "displaypad"
}