Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/pypi/tests/data/https_pypi.org/pypi_upymenu_json
- This file was added.
{ | |||||
"info": { | |||||
"author": "Joost Plattel", | |||||
"author_email": "", | |||||
"bugtrack_url": null, | |||||
"classifiers": [], | |||||
"description": "# uPyMenu\n\nuPyMenu is a micropython menu implementation for LCD displays. Coming from an Arduino experience, I was used with [LiquidCrystal](https://github.com/arduino-libraries/LiquidCrystal) and [LiquidMenu](https://github.com/VaSe7u/LiquidMenu), but they don't offer a python implementation. So I figured I could create one myself.\n\n# Development\n\nCurrent development is done based on when I have to to work on it when I want to. But feel free to fork it and add your functionality. If you find any bugs or have suggestions for features, please open up a issue (or pull-request if you create the feature yourself!).\n\n## TODO\n\n* Add arguments to callback actions in the menu\n\n# Usage\n\nThe example below renders a menu with a submenu and actions that have callbacks attached which you can use to run your own function. It requires one dependency, and that's [`python_lcd`](https://github.com/dhylands/python_lcd) for interacting with the LCD itself.\n\n```python\nfrom machine import Pin, I2C # Basics for creating an LCD interface\nfrom esp8266_i2c_lcd import I2cLcd # Example LCD interface used\nfrom upymenu import Menu, MenuAction, MenuNoop\n\ndef action_callback():\n print(\"callback action chosen\")\n\nsubmenu = Menu(\"Submenu\")\nsubmenu_action_1 = MenuAction(\"Submenu Action\", callback=action_callback)\nsubmenu_action_2 = MenuAction(\"Submenu Action 1\", callback=action_callback)\nsubmenu.add_option(submenu_action_1)\nsubmenu.add_option(submenu_action_2)\n\nmenu_action = MenuAction(\"Action\", callback=action_callback)\nmenu = Menu(\"Main Menu\")\nmenu.add_option(submenu)\nmenu.add_option(menu_action)\nmenu.add_option(MenuNoop(\"Nothing here\"))\n\n# Example config for LCD via i2c, you will need this \n# for the menu to function, the screen size is required\n# to render the menu correctly on the screen.\ni2c = I2C(scl=Pin(5), sda=Pin(4), freq=400000)\nlcd = I2cLcd(i2c, 0x3F, 4, 20)\n\ncurrent_menu = menu.start(lcd) # Starts the menu on the LCD\n\nmenu.focus_next() # Focus on the next item in the menu \nmenu.focus_prev() # Focus on the previous item in the menu \n\n# Choose the focused item, if it's and action execute \n# the callback, or if it is a menu, render that menu.\nmenu = menu.choose()\n\n# If it's a submenu, you can use the parent() function\n# to navigate back up to the tree.\nmenu = menu.parent() \n```\n\n# Testing\n\nIf you have a `micropython` port running locally, you can run the test suite with it, ie: `micropython tests.py`. This is as close I can get with my current knowledge about micropython. Any pointers and suggestions towards improvement here would be appreciated!\n\n", | |||||
"description_content_type": "text/markdown", | |||||
"docs_url": null, | |||||
"download_url": "", | |||||
"downloads": { | |||||
"last_day": -1, | |||||
"last_month": -1, | |||||
"last_week": -1 | |||||
}, | |||||
"home_page": "https://github.com/jplattel/upymenu", | |||||
"keywords": "", | |||||
"license": "", | |||||
"maintainer": "", | |||||
"maintainer_email": "", | |||||
"name": "upymenu", | |||||
"package_url": "https://pypi.org/project/upymenu/", | |||||
"platform": "", | |||||
"project_url": "https://pypi.org/project/upymenu/", | |||||
"project_urls": { | |||||
"Homepage": "https://github.com/jplattel/upymenu" | |||||
}, | |||||
"release_url": "https://pypi.org/project/upymenu/0.0.1/", | |||||
"requires_dist": null, | |||||
"requires_python": "", | |||||
"summary": "A micropython Menu for LCD Displays", | |||||
"version": "0.0.1" | |||||
}, | |||||
"last_serial": 6514377, | |||||
"releases": { | |||||
"0.0.1": [ | |||||
{ | |||||
"comment_text": "", | |||||
"digests": { | |||||
"md5": "9a71147f342cf1a2f224bc39bab467de", | |||||
"sha256": "45159f7c599400fdb8ba69e898472481b2f4e72eb417c90bf425b1cea7bd0442" | |||||
}, | |||||
"downloads": -1, | |||||
"filename": "upymenu-0.0.1-py3-none-any.whl", | |||||
"has_sig": false, | |||||
"md5_digest": "9a71147f342cf1a2f224bc39bab467de", | |||||
"packagetype": "bdist_wheel", | |||||
"python_version": "py3", | |||||
"requires_python": null, | |||||
"size": 4515, | |||||
"upload_time": "2020-01-24T15:47:22", | |||||
"upload_time_iso_8601": "2020-01-24T15:47:22.810597Z", | |||||
"url": "https://files.pythonhosted.org/packages/2a/1a/3dd2d22a22150a74c2d664163cd3739c91612838377128cc2d3da43285f7/upymenu-0.0.1-py3-none-any.whl" | |||||
}, | |||||
{ | |||||
"comment_text": "", | |||||
"digests": { | |||||
"md5": "dc87480218b64094e9b8a4191bd6d9ef", | |||||
"sha256": "05c86d8690d8fd8f331ddca03544608a1e7993226d5d14ce5a7bbb96d215cc18" | |||||
}, | |||||
"downloads": -1, | |||||
"filename": "upymenu-0.0.1.tar.gz", | |||||
"has_sig": false, | |||||
"md5_digest": "dc87480218b64094e9b8a4191bd6d9ef", | |||||
"packagetype": "sdist", | |||||
"python_version": "source", | |||||
"requires_python": null, | |||||
"size": 2848, | |||||
"upload_time": "2020-01-24T15:47:25", | |||||
"upload_time_iso_8601": "2020-01-24T15:47:25.223650Z", | |||||
"url": "https://files.pythonhosted.org/packages/86/10/c9555ec63106153aaaad753a281ff47f4ac79e980ff7f5d740d6649cd56a/upymenu-0.0.1.tar.gz" | |||||
} | |||||
] | |||||
}, | |||||
"urls": [ | |||||
{ | |||||
"comment_text": "", | |||||
"digests": { | |||||
"md5": "9a71147f342cf1a2f224bc39bab467de", | |||||
"sha256": "45159f7c599400fdb8ba69e898472481b2f4e72eb417c90bf425b1cea7bd0442" | |||||
}, | |||||
"downloads": -1, | |||||
"filename": "upymenu-0.0.1-py3-none-any.whl", | |||||
"has_sig": false, | |||||
"md5_digest": "9a71147f342cf1a2f224bc39bab467de", | |||||
"packagetype": "bdist_wheel", | |||||
"python_version": "py3", | |||||
"requires_python": null, | |||||
"size": 4515, | |||||
"upload_time": "2020-01-24T15:47:22", | |||||
"upload_time_iso_8601": "2020-01-24T15:47:22.810597Z", | |||||
"url": "https://files.pythonhosted.org/packages/2a/1a/3dd2d22a22150a74c2d664163cd3739c91612838377128cc2d3da43285f7/upymenu-0.0.1-py3-none-any.whl" | |||||
}, | |||||
{ | |||||
"comment_text": "", | |||||
"digests": { | |||||
"md5": "dc87480218b64094e9b8a4191bd6d9ef", | |||||
"sha256": "05c86d8690d8fd8f331ddca03544608a1e7993226d5d14ce5a7bbb96d215cc18" | |||||
}, | |||||
"downloads": -1, | |||||
"filename": "upymenu-0.0.1.tar.gz", | |||||
"has_sig": false, | |||||
"md5_digest": "dc87480218b64094e9b8a4191bd6d9ef", | |||||
"packagetype": "sdist", | |||||
"python_version": "source", | |||||
"requires_python": null, | |||||
"size": 2848, | |||||
"upload_time": "2020-01-24T15:47:25", | |||||
"upload_time_iso_8601": "2020-01-24T15:47:25.223650Z", | |||||
"url": "https://files.pythonhosted.org/packages/86/10/c9555ec63106153aaaad753a281ff47f4ac79e980ff7f5d740d6649cd56a/upymenu-0.0.1.tar.gz" | |||||
} | |||||
] | |||||
} |