Check out the python-inquirer package.
To create a list of checkboxes, you can do something like this:
import inquirer
questions = [inquirer.Checkbox(
'interests',
message="What are you interested in?",
choices=['Computers', 'Books', 'Science', 'Nature', 'Fantasy', 'History'],
)]
answers = inquirer.prompt(questions)
print(answers['interests'])
source
share