CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 236 forks source link

Associating additional information with Choices list items #95

Closed rstmsn closed 4 years ago

rstmsn commented 4 years ago

When defining a question of type 'list', the 'choices' key takes a list of all possible choices. These choices are printed to screen as strings which the user will then select from. What would be the reccommended approach to associate additional information with each of these choices.. for example a primary key integer relating to a database entry ?

rstmsn commented 4 years ago

Just discovered the possiblity of choices as an array of objects, each with name/value/short properties!.