Registry / serialization / pick
library2.6.0pypypi✓ verified 84d ago

Pick is a small Python library that simplifies creating interactive selection lists in the terminal. It provides a straightforward API for single and multi-select menus, making it easy to build command-line interfaces. The library is currently at version 2.6.0 and maintains an active, though not rapid, release cadence.

pip install pick
INSTALL
IMPORT
SIG · PICK
P
pick
serializationpythonv2.6.0
Install
1.7s avg
Import
51ms
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.053s · 26.5MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 1.7s · import 0.048s · 27MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pick
from pick import pick

This quickstart demonstrates both single and multi-selection using the `pick` function. For multi-selection, users can navigate with arrow keys, select/deselect with SPACE, and finalize their choices with ENTER. The `min_selection_count` ensures a minimum number of items are selected before proceeding.

from pick import pick # Single selection example title = 'Please choose your favorite programming language: ' options = ['Python', 'JavaScript', 'C/C++', 'Java', 'Rust'] selected, index = pick(options, title) print(f"You picked {selected} at index {index}") # Multi-selection example title_multiselect = 'Please choose all languages you like (press SPACE to select, ENTER to finish): ' min_selection = 1 # User must select at least 1 item selected_multi, indices_multi = pick(options, title_multiselect, multiselect=True, min_selection_count=min_selection) print(f"You picked {selected_multi} at indices {indices_multi}")
Debug
Known issues
gotchaThe default backend for `pick` is `curses`, which is primarily designed for Unix-like systems. On Windows, `curses` is not available by default and can lead to `ModuleNotFoundError` or `AttributeError`. For cross-platform compatibility, especially on Windows, consider installing `blessed` and specifying it as the backend.
fix
Install with `pip install "pick[blessed]"` and then pass `backend='blessed'` to the `pick` function, e.g., `pick(options, title, backend='blessed')`.
affects: All versions
gotchaWhen using `multiselect=True` with `min_selection_count`, the user cannot exit the selection menu by pressing ENTER until they have selected at least the specified minimum number of items. This can be confusing if the user attempts to complete the selection prematurely.
fix
Ensure clear instructions are provided to the user, or set `min_selection_count=0` if no minimum is strictly required, allowing them to proceed with no selections.
affects: All versions with multiselect feature
gotchaAs `pick` relies on terminal capabilities, display issues or unexpected behavior can occur across different terminal emulators or operating systems, particularly with the default `curses` backend. Font rendering, color support, and keybindings can vary.
fix
Test your `pick` application on target environments. Using the `blessed` backend (if compatible with your needs) or ensuring the user's `TERM` environment variable is correctly set can sometimes alleviate compatibility problems.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pick'
The 'pick' library has not been installed in your Python environment or the Python interpreter cannot find it.
fix
Run `pip install pick` in your terminal to install the library.
TypeError: 'str' object is not iterable
The `options` argument passed to `pick.pick()` is a string, but it expects an iterable (like a list or tuple) of choices.
fix
Ensure the `options` argument is a list or tuple of strings, e.g., `options = ['option1', 'option2']`.
ValueError: default_index out of bounds
The `default_index` provided to `pick.pick()` is a number outside the valid range of indices for the given `options` list.
fix
Set `default_index` to an integer that is a valid index for your `options` list (e.g., between 0 and `len(options) - 1`).
TypeError: expected string or bytes-like object
The `title` argument passed to `pick.pick()` is not a string, but the library expects a string to display as the menu title.
fix
Provide a string for the `title` argument, e.g., `title='Please select an option:'`.
Upgrade
Version history
2.6.0latest on PyPI · released Feb 28, 2026
Audit
Dependencies
blessedoptionalOptional dependency for an alternative terminal rendering backend, used by 'pick[blessed]'.
Agent activity
2 hits · last 30 days
node
2
Resources
pick — pip install pick · libregistry