You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

inputselect

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inputselect

A Python module for selecting options in the Python interactive terminal.

1.0
pipPyPI
Maintainers
1

INPUTSELECT

"inputselect" is a tool for selecting options on the Python command line. "inputselect" works by only presenting the user with the options that the developer wants them to pick, and forces them to choose before moving on. It eliminates the hassle of trying to get the user to choose only from a set of specific options, and fixes the trouble with typos and repeat loops.

API Reference

Allow the user to select options horizontally in the Python interactive terminal.

inputselect.List(message: str = "", choices=None, separator: str = " ", spin_speed: int = 0, colors=DEF_COLORS, font_effects=[]):
ParameterTypeDescription
messagestringNot required. The message that the user sees before the options are presented to them.
choiceslist or tupleRequired. The choices to be displayed on the terminal.
separatorstringNot required. The string that separates each option.
spin_speedintegerNot required. The speed at which the choices spin (spins the display forwards if x>0, backwards if x<0, and lets the user choose if x=0)
colorslist or tupleNot required. The respective colors of the text and bg of the option the user currently rests on (blue text and no bg by default)
font_effectslist or tupleNot required. Allows the user to select different font effects: bold, italic, underline, and strikethrough (none by default)

Allow the user to select options in a sort of vertical slider in the Python interactive terminal.

inputselect.Slider(message: str = "", choices=None, spin_speed: int = 0, colors=DEF_COLORS, wrap=True, font_effects=[]):
ParameterTypeDescription
messagestringNot required. The message that the user sees before the options are presented to them.
choiceslist or tupleRequired. The choices to be displayed on the terminal.
spin_speedintegerNot required. The speed at which the choices spin (spins the display forwards if x>0, backwards if x<0, and lets the user choose if x=0)
colorslist or tupleNot required. The respective colors of the text and bg of the option the user currently rests on (blue text and no bg by default)
wrapbooleanNot required. Whether or not to give the slider a wrap-around feature
font_effectslist or tupleNot required. Allows the user to select different font effects: bold, italic, underline, and strikethrough (none by default)

Allow the user to check and uncheck options in the Python interactive terminal.

inputselect.Checkbox(message: str = "pick an animal: ", choices=None, separator: str = " ", min_choices=2, colors=DEF_COLORS, alt_colors=ALT_COLORS, font_effects=[]):
ParameterTypeDescription
messagestringNot required. The message that the user sees before the options are presented to them.
choiceslist or tupleRequired. The choices to be displayed on the terminal.
separatorstringNot required. The string that separates each option.
min_choicesintegerNot required. The minimum amount of choices for the user to pick before they can exit (by default it is set to 2)
max_choicesintegerNot required. The maximum amount of choices for the user to pick before they can exit (by default it is set to 2)
colorslist or tupleNot required. The respective colors of the text and bg of the option the user currently rests on (blue text and no bg by default)
alt_colorslist or tupleNot required. The respective colors of the text and bg of the option(s) the user has selected (yellow text and no bg by default)
font_effectslist or tupleNot required. Allows the user to select different font effects: bold, italic, underline, and strikethrough (none by default)

AUTHORS

  • @ItchyPython3759

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts