A simple library for creating beautiful interactive prompts.
Project description
Showcase
A simple library for creating beautiful interactive prompts.
import survey
name = survey.input('Username: ')
password = survey.password('Password: ')
actions = ('Call', 'Text', 'Exit')
index = survey.select(actions, 'Chose an action: ')
# if index == 0: elif index == 1: else: ...
contacts = ('Mom', 'Daniel', 'Cat', 'Alice', 'John', 'Sis', 'Lawyer', 'Robert')
indexes = survey.select(contacts, 'Select recipients: ', multi = True)
message = survey.input('Type messsage: ', multi = True)
confirm = survey.confirm(f'Message is {len(message)} characters long. Send? ', default = True)
Installing
pip3 install survey
Links
- Greatly inspired by AlecAivazis's GoLang library.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
survey-2.0.0.tar.gz
(13.4 kB
view hashes)