select_options
select_options is a Python library for creating interactive selection menus in terminal applications. Designed for personal use, but open to proposals and contributions.
Overview
A simple library to make a beautiful appearance on the console to select one or various options.
Features
- Interactive selection menus
- Multiselect support
- Customizable prompts
- Adjustable columns (auto between 2-5, manual control planned)
- Limit selection in multiselect menus
- Future: color customization
Installation
Install via pip:
pip install select_options
Or install from source:
git clone https://github.com/Gerry1402/select.git
cd select
pip install .
Usage
For every type of iterable except dict, the menu shows the string representation of each item. If items are not stringifiable, use a dict where the key is the displayed content and the value is the result.
Example:
from select_options import Select
options = ["Option 1", "Option 2", "Option 3"]
selected = Select(options, prompt="Choose an option")
single = selected.run()
print(f"You selected: {single_selected}")
select.prompt = "Choose one or various options"
selected.multiselect = True
multi = selected.run()
Parameters
- Title: Purpose of the selection, instructions shown below the table.
- Multiselect: Allows multiple selections.
- Limit: Restricts the number of selections in multiselect menus.
- Columns: Auto-adjusts columns (2-5); manual control planned.
Compatibility
Tested on Windows 11. Compatibility with other OS/environments is not guaranteed.
Requirements
- Python >= 3.7
- textual
License
MIT License
Gerard Vello
Email: gerard.vello@gmail.com
Roadmap
- Manual column control
- Color customization
Screenshots
This is the base color for Multi-select and Single-select.
This are the colors that appear on the Multi-select, the blue are the selected ones and the purple is the current position over a selected option.
Contributions, suggestions, and issues are welcome. Feel free to open a pull request or issue on GitHub.
Metadata
Release files for select-options 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| select_options-1.1.1.tar.gz | 52.8 kB | Without provenance | Details for select_options-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| select_options-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for select_options-1.1.1-py3-none-any.whl |
Total release size: 58.8 kB
Release files / select_options-1.1.1.tar.gz
| Download URL | select_options-1.1.1.tar.gz |
|---|---|
| Size | 52.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8e771504c051c2d05f330a06e0a0a0130f3c2a09dee61b702e4867d9a49cad2
|
|
BLAKE2b-256 checksum How to use checksums |
4db59b792d9e4bc37dc6e05f1a3e80ec5742f53a5d505c999974d59f51bcf7ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / select_options-1.1.1-py3-none-any.whl
| Download URL | select_options-1.1.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fc1d62b72627f785c696f136c1351c462ff1e1e6244b491f5fced8976511e67
|
|
BLAKE2b-256 checksum How to use checksums |
e59089b539455ae26b93685c0604818defdb6170a1845063189e1383a6a4f5f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for select-options 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.