Skip to main content

groupick

image PyPI PyPI

[!WARNING]

This project is semi-abandoned. If anyone is using it, submit an issue and I will check why the CI is failing.

groupick is a small python library based on wong2's pick which allows you to create a curses-based interactive selection in the terminal. With groupick you can assign options to groups.

Installation

$ pip install groupick

Usage

groupick comes with a simple api:

>>> from groupick import groupick

>>> instructions = "Assign languages to groups 'a', 'b' or '1'."
>>> options = ["Java", "JavaScript", "Python", "PHP", "C++", "Erlang", "Haskell"]
>>> groups:set = {"a", "b", 1}
>>> selected = groupick(options, groups, instructions, indicator="=>", default_index=2)
>>> print(f"Here is your assignment: {selected}")

output:

>>> {'1': [], 'a': [("JavaScript", 1)], 'b': []}

Options

  • options: a list of options to choose from
  • groups: a list of ints and/or characters symbolising groups (max-length per item is 1)
  • instructions: (optional) a title above options list
  • indicator: (optional) custom the selection indicator, defaults to *
  • default_index: (optional) index of item where cursor starts at by default
  • handle_all: (optional) define whether it is mandatory to assign all options to groups, defaults to False
  • screen: (optional), if you are using groupick within an existing curses application, pass your existing screen object. It is assumed this has initialised in the standard way (e.g. via curses.wrapper(), or curses.noecho(); curses.cbreak(); screen.kepad(True))

Community Projects

wong2's pick: Original pick project, for selecting one or more options (no grouping)

pickpack: A fork of pick to select tree data.

Release files for groupick 1.1.2.post3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for groupick 1.1.2.post3
File Size Uploaded
groupick-1.1.2.post3.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for groupick 1.1.2.post3
File Interpreter ABI Platform
groupick-1.1.2.post3-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / groupick-1.1.2.post3.tar.gz

Download URL groupick-1.1.2.post3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bef98edd9cf2369cea7e709a8bca8d59b61e49dcf7b8f79c0e711d534d8674e9
BLAKE2b-256 checksum
How to use checksums
d265f5121d2980b03dc6172ac1916a9a5628163a954e138f475f4206e774919d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / groupick-1.1.2.post3-py3-none-any.whl

Download URL groupick-1.1.2.post3-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3408703d8556be05859b0db15a3c823ad5dd41e7665f0b89e1d9a0418be37f74
BLAKE2b-256 checksum
How to use checksums
a2c1667f6bed11e0fef76716ce5b73b023e7e5fb44ac21a16925637906730837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.1.2.post3 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.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