Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

python click prompt multiline

Writer Andrew Henderson

I'm using click to create a CLI tool and need to prompt for a JSON payload. Is there a way to prompt for multiple lines using the following (or any other API)?

click.prompt( "Payload", type=click.STRING
)

Thanks!

2

1 Answer

I believe you're looking for the Click edit API. Like it says in its documentation here:

This is very useful for asking users for multi-line input.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.