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
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.2.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file itemlist-0.1.2.tar.gz.
File metadata
- Download URL: itemlist-0.1.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fef5e6ad59c50f829ee76a3ce0ef0cd35f1ea2e7ef672a329c35c83745e00e69
|
|
| MD5 |
88a24a9921ed2640e8ef2681261da726
|
|
| BLAKE2b-256 |
4c77524b0305ea13e7a2faa0800bd77e9dc308a6ecbcec9e77752e4d75ad86d8
|
File details
Details for the file itemlist-0.1.2-py3-none-any.whl.
File metadata
- Download URL: itemlist-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b33a81d5abe86faf622733e07b2fbf41f1a9cffec7815d1fe7775abcdad15bc0
|
|
| MD5 |
7300bb62a5857aaf5049832b88191f45
|
|
| BLAKE2b-256 |
2ad61804b3c9b6a6e406ab4174d5247e3e041a948943f7439172499683936d5c
|