Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: field name for prompts #40

Open
woile opened this issue Mar 29, 2019 · 1 comment
Open

feature request: field name for prompts #40

woile opened this issue Mar 29, 2019 · 1 comment
Labels
working on this issue I'm working on this issue now :)

Comments

@woile
Copy link

woile commented Mar 29, 2019

Hey first of all, thanks for the library, it's really simple and beautiful.

I was wondering if it would be possible to have something like this:

from bullet import Bullet
cli = Bullet(
    prompt = "Choose from the items below: ", 
    choices = ["first item", "second item", "third item"], 
    field_name="item_name")
result = cli.launch()
print(dict(result))

Current output

{
    "Choose from the items below: ": "first item"
}

Expected output

{
    "item_name: ": "first item"
}

Sorry if it's already there, but I haven't seen it in the source code.

The idea would be to make it a drop-in replacement for other libraries doing the same thing.
https://github.com/tmbo/questionary
https://github.com/finklabs/whaaaaat
https://github.com/CITGuru/PyInquirer

Thanks!

@bchao1 bchao1 added the working on this issue I'm working on this issue now :) label May 27, 2019
@fernando-mc
Copy link

@Mckinsey666 love the library. I also think this would be a useful addition to allow you to automatically structure the output in a way that works for whatever it gets sent off to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
working on this issue I'm working on this issue now :)
Projects
None yet
Development

No branches or pull requests

3 participants