simple and pretty tool for selecting items by keyboard in terminal
Project description
easyselect by gmanka
a useful library that allows the user to select between multiple items in the console using the keyboard. Supports very long lists that don't fit on the screen, rich styles, control with buttons up
, down
, left
, right
, wasd
, j
, h
, home
, end
, page up
, page down
navigation
- installation
- usage
- print text while choosing
- rich styles support
- long items list support
- page size
- supported buttons
- changelog
- license
installation^
pip install easyselect
usage^
from easyselect import Sel
yes_or_no = Sel(
items = [
'yes',
'no',
]
)
answer = yes_or_no.choose()
print(answer)
print text while choosing^
yes_or_no = Sel(
items = [
'yes',
'no',
],
text = 'please select yes or no'
)
rich styles support^
linux only
yes_or_no = Sel(
items = [
'yes',
'no',
],
styles = [
'green',
'red'
]
)
very long items list support^
nums = Sel(
items = list(range(50))
)
page size^
page_size arg allows to specify how much lines will be rendered on screen
default value is 15
nums = Sel(
items = list(range(50)),
page_size = 3
)
supported buttons^
user will able to use these buttons
- up, down, left, right
- w, a, s, d, j, k
- home, end
- page up, page down
changelog^
you can read changelog here
license^
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easyselect-23.0.0.tar.gz
(201.8 kB
view details)
Built Distribution
File details
Details for the file easyselect-23.0.0.tar.gz
.
File metadata
- Download URL: easyselect-23.0.0.tar.gz
- Upload date:
- Size: 201.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7d2ce1d96b6d04260cf47f2c0696a43e6add6eea1013a4a48bd345d17ef2044 |
|
MD5 | a4a6111388400241d86b3b4474e7f69e |
|
BLAKE2b-256 | 627378173fe0679df7ce85900a8e44ed332a9338fcd96fcb707e46bd3e96119d |
File details
Details for the file easyselect-23.0.0-py3-none-any.whl
.
File metadata
- Download URL: easyselect-23.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53abef2fa7ae60c81cc02530d22eae05337f3a2098a4f266cb1eeaceedc9ebe1 |
|
MD5 | 154b3ef44735a55285e456c5f39db237 |
|
BLAKE2b-256 | b9a5e0df3321144d02592b5d4741693cf874215d179e6749c5189259ecd5e26a |