Skip to main content

Simple CLI to provide choices to a user, and let them type in phrases which filters possible options.

Project description

Typing Filter

Simple CLI for a typing filter to provide choices to a user and let them type in phrases which filters possible options.

Status: in progress · Notion Roadmap »

https://user-images.githubusercontent.com/6320907/230550634-3ac6b92a-bbd2-4723-93ce-218ad02d8a31.mov

Installation

Install the package from PyPi via pip

pip install typing-filter

(back to top)

Usage

With a list of options ready, a list of descriptions, just import the package call the launch function.

import typing_filter
options = ['Alaska', 'Massachusetts', 'California']
descriptions = [None, 'My home state', 'My current state']
choice = typing_filter.launch(options, descriptions)

The selected choice is returned by the launch function, and is None if the operation was canceled.

Additional options can be made by tweaking the launch command:

import typing_filter
options = ['Alaska', 'Massachusetts', 'California']
descriptions = [None, 'My home state', 'My current state']
choice = typing_filter.launch(
  options, descriptions,
  description_separator=': ',
  header='Press Escape to quit!',
  prompt='Input:',
  selector='==>>', selector_padding=3
)

(back to top)

Roadmap

Refer to the Notion Roadmap for future features and the state of the project.

(back to top)

Contact

Created by Jonathan Delgado.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typing_filter-0.1.1.tar.gz (17.8 kB view hashes)

Uploaded Source

Built Distribution

typing_filter-0.1.1-py3-none-any.whl (30.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page