Skip to main content

A simple library for creating beautiful interactive prompts.

Project description

✨ A simple library for creating beautiful interactive prompts.

Showcase

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 = ('Squig', 'Zelan', 'Momo', 'Hamberg', 'Evan', 'Vonnie', 'Dwalon', 'Hacen')
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)

Features

  • Pythonic: friendly interface wrapped around simple functions.
  • Lightweight: independent of any other prompt or visual libraries.
  • Adaptable: works with any string formatting and window size.
  • Extensive: packed with tweaks and features for any situation.

Installing

  pip3 install survey

Links

Suggestions and contributions are greatly appreciated!

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

survey-2.0.3.tar.gz (15.2 kB view hashes)

Uploaded Source

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