python-fire
python-fire copied to clipboard
Feature : exclude_name_list
Sometimes, we have a very long file of utilities, we want to expose all functions except some names.
It would be useful to have this to filter out some exposure.
fire.Fire(exclude_name_list = [ 'os', 'myfun1*', 'myfun2*'])
Take a look at #47 and see if that helps you out.
- suppose we have 40 functions, and want to expose all, but exclude only 10….
Having an exclusion list can be helpful.
Renaming to _ is not perfect since those functions can be reused in python code…
- suppose we have 40 functions, and want to expose all, but exclude only 10….
Depending on how you use import ... __all__ could be useful in your situation.
Thanks for the feature request. I see the value of this and it is something we might consider in the future. It's not currently planned though.