How to pass several list of arguments to @click.option

If you don’t insist on passing something that looks like a list, but simply want to pass multiple variadic arguments, you can use the multiple option. From the click documentation @click.command() @click.option(‘–message’, ‘-m’, multiple=True) def commit(message): click.echo(‘\n’.join(message)) $ commit -m foo -m bar foo bar

Call another click command from a click command

When you call add_name() and add_surname() directly from another function, you actually call the decorated versions of them so the arguments expected may not be as you defined them (see the answers to How to strip decorators from a function in python for some details on why). I would suggest modifying your implementation so that … Read more

Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment

If you are trying to execute tests case you must set the following environment variables each time: export LC_ALL=en_US.utf-8 export LANG=en_US.utf-8 Doing this each time will resolve the error. It may also be possible to set this in your IDE run configuration as LC_ALL=en_US.UTF-8;LANG=en_US.UTF-8 For example see the following setting in PyCharm 2016:

How can I split my Click commands, each with a set of sub-commands, into multiple files?

The downside of using CommandCollection for this is that it merges your commands and works only with command groups. The imho better alternative is to use add_command to achieve the same result. I have a project with the following tree: cli/ ├── __init__.py ├── cli.py ├── group1 │   ├── __init__.py │   ├── commands.py └── group2 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)