circuitpython-displayio-listselect


Namecircuitpython-displayio-listselect JSON
Version 1.0.2 PyPI version JSON
download
home_page
SummaryListSelect widget for circuitpython displayio. Display a list of strings with a selection indicator allow user to move selection up and down.
upload_time2023-05-13 14:40:52
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit blinka circuitpython micropython displayio_listselect list select listselect dropdown choice choose chooser options menu
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============


.. image:: https://readthedocs.org/projects/circuitpython-displayio-listselect/badge/?version=latest
    :target: https://circuitpython-displayio-listselect.readthedocs.io/
    :alt: Documentation Status



.. image:: https://img.shields.io/discord/327254708534116352.svg
    :target: https://adafru.it/discord
    :alt: Discord


.. image:: https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect/workflows/Build%20CI/badge.svg
    :target: https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect/actions
    :alt: Build Status


.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Code Style: Black

ListSelect widget for circuitpython displayio. Display a list of strings with a selection indicator allow user to move selection up and down.


Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.

Installing from PyPI
=====================

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/circuitpython-displayio-listselect/>`_.
To install for current user:

.. code-block:: shell

    pip3 install circuitpython-displayio-listselect

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install circuitpython-displayio-listselect

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .env/bin/activate
    pip3 install circuitpython-displayio-listselect

Installing to a Connected CircuitPython Device with Circup
==========================================================

Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:

.. code-block:: shell

    pip3 install circup

With ``circup`` installed and your CircuitPython device connected use the
following command to install:

.. code-block:: shell

    circup install displayio_listselect

Or the following command to update an existing version:

.. code-block:: shell

    circup update

Usage Example
=============

.. code-block:: python

    import time
    import displayio
    import board
    from displayio_listselect import ListSelect

    display = board.DISPLAY

    main_group = displayio.Group()
    display.show(main_group)

    items = ["First", "Second", "Third", "Fourth"]

    list_select = ListSelect(scale=2, items=items)

    main_group.append(list_select)

    list_select.anchor_point = (0.5, 0.5)
    list_select.anchored_position = (display.width // 2, display.height // 2)

    for i in range(3):
        list_select.move_selection_down()
        time.sleep(1)

    for i in range(3):
        list_select.move_selection_up()
        time.sleep(1)

    list_select.selected_index = 3
    while True:
        pass

Documentation
=============
API documentation for this library can be found on `Read the Docs <https://circuitpython-displayio-listselect.readthedocs.io/>`_.

For information on building library documentation, please check out
`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "circuitpython-displayio-listselect",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,blinka,circuitpython,micropython,displayio_listselect,list,select,listselect,dropdown,choice,choose,chooser,options,menu",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/52/25/a6ffb3f7bbce54417cfabdc45f1b812b25e617bc769178c0e4ee34868ff0/circuitpython-displayio-listselect-1.0.2.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n\n.. image:: https://readthedocs.org/projects/circuitpython-displayio-listselect/badge/?version=latest\n    :target: https://circuitpython-displayio-listselect.readthedocs.io/\n    :alt: Documentation Status\n\n\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n\n.. image:: https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect/workflows/Build%20CI/badge.svg\n    :target: https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect/actions\n    :alt: Build Status\n\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Code Style: Black\n\nListSelect widget for circuitpython displayio. Display a list of strings with a selection indicator allow user to move selection up and down.\n\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_\nor individual libraries can be installed using\n`circup <https://github.com/adafruit/circup>`_.\n\nInstalling from PyPI\n=====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/circuitpython-displayio-listselect/>`_.\nTo install for current user:\n\n.. code-block:: shell\n\n    pip3 install circuitpython-displayio-listselect\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install circuitpython-displayio-listselect\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name && cd project-name\n    python3 -m venv .venv\n    source .env/bin/activate\n    pip3 install circuitpython-displayio-listselect\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n    pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n    circup install displayio_listselect\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n    circup update\n\nUsage Example\n=============\n\n.. code-block:: python\n\n    import time\n    import displayio\n    import board\n    from displayio_listselect import ListSelect\n\n    display = board.DISPLAY\n\n    main_group = displayio.Group()\n    display.show(main_group)\n\n    items = [\"First\", \"Second\", \"Third\", \"Fourth\"]\n\n    list_select = ListSelect(scale=2, items=items)\n\n    main_group.append(list_select)\n\n    list_select.anchor_point = (0.5, 0.5)\n    list_select.anchored_position = (display.width // 2, display.height // 2)\n\n    for i in range(3):\n        list_select.move_selection_down()\n        time.sleep(1)\n\n    for i in range(3):\n        list_select.move_selection_up()\n        time.sleep(1)\n\n    list_select.selected_index = 3\n    while True:\n        pass\n\nDocumentation\n=============\nAPI documentation for this library can be found on `Read the Docs <https://circuitpython-displayio-listselect.readthedocs.io/>`_.\n\nFor information on building library documentation, please check out\n`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ListSelect widget for circuitpython displayio. Display a list of strings with a selection indicator allow user to move selection up and down.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/foamyguy/CircuitPython_DisplayIO_ListSelect"
    },
    "split_keywords": [
        "adafruit",
        "blinka",
        "circuitpython",
        "micropython",
        "displayio_listselect",
        "list",
        "select",
        "listselect",
        "dropdown",
        "choice",
        "choose",
        "chooser",
        "options",
        "menu"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fefd2a90c4eb4eb864fd1c3a40aad3c2754035d7c5dad38789271c3b5f7c5e7f",
                "md5": "450b2e069220be46c8d1f3d4172fe5b0",
                "sha256": "5370b297654d0c2bd23e96d116139943fe9cf21830a61e64404c47690cc4fd8e"
            },
            "downloads": -1,
            "filename": "circuitpython_displayio_listselect-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "450b2e069220be46c8d1f3d4172fe5b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5560,
            "upload_time": "2023-05-13T14:40:50",
            "upload_time_iso_8601": "2023-05-13T14:40:50.463766Z",
            "url": "https://files.pythonhosted.org/packages/fe/fd/2a90c4eb4eb864fd1c3a40aad3c2754035d7c5dad38789271c3b5f7c5e7f/circuitpython_displayio_listselect-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5225a6ffb3f7bbce54417cfabdc45f1b812b25e617bc769178c0e4ee34868ff0",
                "md5": "315cb2318a8b91239e955841aa093579",
                "sha256": "4db13f7bbda59346812fb3f308ab65418eedf93fb0580e07ac01c21aedc0cba1"
            },
            "downloads": -1,
            "filename": "circuitpython-displayio-listselect-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "315cb2318a8b91239e955841aa093579",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 28515,
            "upload_time": "2023-05-13T14:40:52",
            "upload_time_iso_8601": "2023-05-13T14:40:52.156293Z",
            "url": "https://files.pythonhosted.org/packages/52/25/a6ffb3f7bbce54417cfabdc45f1b812b25e617bc769178c0e4ee34868ff0/circuitpython-displayio-listselect-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-13 14:40:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "foamyguy",
    "github_project": "CircuitPython_DisplayIO_ListSelect",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "circuitpython-displayio-listselect"
}
        
Elapsed time: 0.08006s