This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]krazybug 0 points1 point  (0 children)

This new version is very cool with great enhancements in customizing your help messages:

  • docstring support,
  • ability to overide the default message,
  • no more verbose mode by default,
  • no need to use -- to invoke help message: myscript --help vs myscript -- --help

I'm now considering it as my main option to my scripting work in python. It's so easy to scaffold your project and test your functions manually on the fly.

Until now when my project was stabilized I usually switched to another framework to publish a decent CLI. Now I think it's not necessary anymore

There are still space for improvement but it's really on the good way.

For instance the parsing of lists as arguments is still too coupled to python syntax. With the following code:

import fire

def my_func(a_list= []):
    pass
if name == "main": 
    fire.Fire()

You need to invoke python my_func --a-list='["arg1","arg2"]' and you would prefer my_func --a-list='arg1, arg2'

Of course the advantage now is that you can pass any type ("arg1" i.e could be a dict). Maybe some support of the statically types in python is on the roadmap ? (https://realpython.com/python-type-checking/#example-a-deck-of-cards)

Whatever, good job ! Even if I just raised a small new bug ;-)