python-fire
python-fire copied to clipboard
Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.
Reproduce as such: ```python # example.py import fire def main(hello: list[str]): print(hello) fire.Fire(main) ``` ```bash python example.py --hello '[this,is,nice]' ``` This would yield the unexpected output where in the `main`...
Here's run.py: ``` import fire def f(x): print(x) if __name__ == '__main__': fire.Fire(f) ``` Command: `python run.py --x 20180217_064501` Output: > 20180217064501 Expected output: > 20180217_064501
This is a follow-up work of #431 to safely bump versions via PR, also triggering all CI to ensure development stability...
Can I have flexible line breaks in the help comments? this is the help doc ``` def func(input_table: str): """Plot region mutation info using table generated by `bioat bam mpileup_to_table`....
+ and add `HasCustomRepr` check in value_types **Issue**: When calling `Fire` on a function that returns a pd.DataFrame, the _PrintResult function in core.py prints the manual for DataFrames from the...
A simple argument is automatically converted to integer because the input only has numeric data in a string. I wondered if it is a wanted feature. Thank you Python3 version...
The help output lists all function (keyword) arguments in the synopsis, arguments and flags. In my specific use case, I would like to exclude some of those arguments, because they...
I have a script which has multiple commands, each of which have their own arguments etc. I would like to add a simple flag to be used standalone to simply...
Consider the following code: ```python import fire def a(flag: bool): if flag: print("hooray!") else: print("Wanna see a flag :(") if __name__ == '__main__': fire.Fire(a) ``` Now, the following options work...