pick

create curses based interactive selection list in the terminal

https://github.com/aisk/pick

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 19 committers (5.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords

cli curses python terminal

Keywords from Contributors

argument-parser profiles interactive positional-arguments subcommands observability autograding hacking archival network-simulation
Last synced: 6 months ago · JSON representation

Repository

create curses based interactive selection list in the terminal

Basic Info
  • Host: GitHub
  • Owner: aisk
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 296 KB
Statistics
  • Stars: 769
  • Watchers: 14
  • Forks: 67
  • Open Issues: 18
  • Releases: 24
Topics
cli curses python terminal
Created about 10 years ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

pick

image PyPI PyPI Python 3.8 - 3.13 support

pick is a small python library to help you create curses based interactive selection list in the terminal.

| Basic | Multiselect | | :--------------------: | :--------------------------: | | | |

Installation

$ pip install pick

Usage

pick comes with a simple api:

>>> from pick import pick

>>> title = 'Please choose your favorite programming language: '
>>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']
>>> option, index = pick(options, title)
>>> print(option)
>>> print(index)

outputs:

>>> C++
>>> 4

pick multiselect example:

>>> from pick import pick

>>> title = 'Please choose your favorite programming language (press SPACE to mark, ENTER to continue): '
>>> options = ['Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell']
>>> selected = pick(options, title, multiselect=True, min_selection_count=1)
>>> print(selected)

outputs:

>>> [('Java', 0), ('C++', 4)]

Options

  • options: a list of options to choose from
  • title: (optional) a title above options list
  • indicator: (optional) custom the selection indicator, defaults to *
  • default_index: (optional) set this if the default selected option is not the first one
  • multiselect: (optional), if set to True its possible to select multiple items by hitting SPACE
  • min_selection_count: (optional) for multi select feature to dictate a minimum of selected items before continuing
  • screen: (optional), if you are using pick within an existing curses application set this to 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))
  • position: (optional), if you are using pick within an existing curses application use this to set the first position to write to. e.g., position=pick.Position(y=1, x=1)
  • quit_keys: (optional), if you want to quit early, you can pass a key codes. If the corresponding key are pressed, it will quit the menu.

Community Projects

pickpack: A fork of pick to select tree data.

Owner

  • Name: AN Long
  • Login: aisk
  • Kind: user
  • Location: China

江山一籠統 井上黑窟窿 黃狗身上白 白狗身上腫

GitHub Events

Total
  • Issues event: 6
  • Watch event: 47
  • Delete event: 7
  • Issue comment event: 12
  • Push event: 8
  • Pull request review event: 2
  • Pull request review comment event: 1
  • Pull request event: 16
  • Fork event: 8
  • Create event: 6
Last Year
  • Issues event: 6
  • Watch event: 47
  • Delete event: 7
  • Issue comment event: 12
  • Push event: 8
  • Pull request review event: 2
  • Pull request review comment event: 1
  • Pull request event: 16
  • Fork event: 8
  • Create event: 6

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 160
  • Total Committers: 19
  • Avg Commits per committer: 8.421
  • Development Distribution Score (DDS): 0.425
Past Year
  • Commits: 11
  • Committers: 5
  • Avg Commits per committer: 2.2
  • Development Distribution Score (DDS): 0.545
Top Committers
Name Email Commits
wong2 w****y@g****m 92
Pfister, Andreas (GE Power) a****r@g****m 15
AN Long a****k 13
dependabot[bot] 4****] 11
Max 5****7 9
Ali Salehi 4****i 4
Sebastian Pipping s****n@p****g 4
Carter Wheatley 5****t 1
Daniele Esposti d****i@g****m 1
Danny Guo d****o 1
Henri-ColibrITD 1****D 1
JM Lopez j****z@u****a 1
Kian-Meng Ang k****g@g****m 1
Max m****x@f****t 1
Paul Zupan 8****2 1
Remi Rampin r****n@g****m 1
p0ns p****s@p****g 1
snail-coupe 5****e 1
Борис Верховский b****k@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 12
  • Total pull requests: 34
  • Average time to close issues: 3 months
  • Average time to close pull requests: 11 days
  • Total issue authors: 11
  • Total pull request authors: 8
  • Average comments per issue: 2.25
  • Average comments per pull request: 1.32
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 10
Past Year
  • Issues: 5
  • Pull requests: 20
  • Average time to close issues: 12 days
  • Average time to close pull requests: 15 days
  • Issue authors: 5
  • Pull request authors: 5
  • Average comments per issue: 0.2
  • Average comments per pull request: 0.45
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 8
Top Authors
Issue Authors
  • gyang2300 (2)
  • ahyou-mug (1)
  • mostafahussein (1)
  • hodapp512 (1)
  • kootenpv (1)
  • ErikGrankvist (1)
  • thisi5patrick (1)
  • tim-morriss (1)
  • davidbeiler1 (1)
  • iJebus (1)
  • Kreijstal (1)
  • 8o5 (1)
  • wsanders (1)
  • fleutot (1)
  • manuel-delverme (1)
Pull Request Authors
  • aisk (18)
  • dependabot[bot] (16)
  • iamalisalehi (7)
  • bigpick (4)
  • kianmeng (2)
  • Henri-ColibrITD (2)
  • Kreijstal (1)
  • Cornelius-Figgle (1)
  • J3ldo (1)
  • kylebebak (1)
Top Labels
Issue Labels
enhancement (3) bug (3) feature-request (1)
Pull Request Labels
dependencies (16) python (3)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 113,524 last-month
  • Total docker downloads: 522
  • Total dependent packages: 61
  • Total dependent repositories: 262
  • Total versions: 33
  • Total maintainers: 2
pypi.org: pick

Pick an option in the terminal with a simple GUI

  • Versions: 33
  • Dependent Packages: 61
  • Dependent Repositories: 262
  • Downloads: 113,524 Last month
  • Docker Downloads: 522
Rankings
Dependent packages count: 0.3%
Dependent repos count: 0.9%
Downloads: 1.0%
Average: 2.2%
Stargazers count: 2.4%
Docker downloads count: 3.2%
Forks count: 5.6%
Maintainers (2)
Last synced: 6 months ago

Dependencies

poetry.lock pypi
  • atomicwrites 1.4.1 develop
  • attrs 21.4.0 develop
  • cfgv 3.3.1 develop
  • colorama 0.4.5 develop
  • distlib 0.3.5 develop
  • filelock 3.7.1 develop
  • identify 2.5.2 develop
  • importlib-metadata 4.8.3 develop
  • iniconfig 1.1.1 develop
  • mypy 0.971 develop
  • mypy-extensions 0.4.3 develop
  • nodeenv 1.7.0 develop
  • packaging 21.3 develop
  • platformdirs 2.5.2 develop
  • pluggy 1.0.0 develop
  • pre-commit 2.20.0 develop
  • py 1.11.0 develop
  • pyparsing 3.0.7 develop
  • pytest 7.1.2 develop
  • pyyaml 6.0 develop
  • six 1.16.0 develop
  • toml 0.10.2 develop
  • tomli 1.2.3 develop
  • typed-ast 1.5.4 develop
  • typing-extensions 4.1.1 develop
  • virtualenv 20.15.1 develop
  • zipp 3.6.0 develop
  • windows-curses 2.3.0
pyproject.toml pypi
  • mypy ^0.971 develop
  • pre-commit ^2.20.0 develop
  • pytest ^7.1.2 develop
  • python >=3.7
  • windows-curses ^2.2.0
.github/workflows/ci.yml actions
  • abatilo/actions-poetry v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite