Skip to main content

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

Base color selection This is the base color for Multi-select and Single-select.

Color of selected ones with current position over a selected 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)

Source distribution for select-options 1.1.1
File Size Uploaded
select_options-1.1.1.tar.gz 52.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for select-options 1.1.1
File Interpreter ABI Platform
select_options-1.1.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page