Skip to main content

ItemList

ItemList is a Python library that allows you to select and search items from the command line. It offers flexible UI options, search functionality, and a cancel option.

Installation

pip install itemlist

Usage

More details can be found in the examples directory.

from itemlist import item

@item
def flow_runner(description="Run the first flow"):
    run_locally(flow)

@item
def flow2_runner(description="Run the second flow"):
    run_locally(flow2)

@item
def flow3_runner(description="Run the third flow"):
    run_locally(flow3)

if __name__ == '__main__':
    selected = item.select()
    item.endwin()

    selected_name, selected_func, selected_func_description = selected

    if selected_func == item._cancel:
        print("Cancel selected. Exiting the program.")
    else:
        print(f"Running: {selected_name}\n")
        print(f"Description: {selected_func_description}\n")
        selected_func()

License

MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itemlist-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

itemlist-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file itemlist-0.1.1.tar.gz.

File metadata

  • Download URL: itemlist-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for itemlist-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a41459aeea083c614ceaff6bb86f1ea0a5dc06e82d1aff1661c3106301491d01
MD5 1a45b0b066f9f88d5b399e5a95747ee3
BLAKE2b-256 5f51c92549fd08f333d10d2fadb4260d7e71d3774b6b0f3f82f4f695ca8089c2

See more details on using hashes here.

File details

Details for the file itemlist-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: itemlist-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for itemlist-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37bab48c835978c2410aa49f61db744e8a08461f247734ae134cfdc006409930
MD5 fa0c88897b14c4c5b2e4991ddb8d908c
BLAKE2b-256 c7d8e7775c57ec4ee15d2c831c9010bc890730833f05a18f02ef7012a3c48484

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 Sentry Error logging StatusPage Status page