Registry / devops / python-fire

python-fire

JSON →
library0.1.0pypypi✓ verified 86d ago

Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object. Current version is 0.1.0. Release cadence is irregular; last release was in 2018.

pip install python-fire
INSTALL
IMPORT
SIG · PYTHON-FIRE
P
python-fire
devopspythonv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fire
import fire
Fire
fire.Fire
from fire import Fire
Fire is a function in the fire module, not a top-level import.

Basic CLI generation from a function.

import fire def hello(name="World"): return "Hello %s!" % name if __name__ == '__main__': fire.Fire(hello)
Debug
Known issues
gotchaFire uses argument parsing that may conflict with argparse or click if used in the same script. Avoid mixing libraries that parse sys.argv.
fix
Use Fire alone for CLI entry points, or call fire.Fire() only when __name__ == '__main__'.
affects: all
gotchaFire's type inference is limited; it may not properly handle complex types like custom classes or nested objects. It works best with simple types.
fix
Provide explicit help strings or use docstrings to guide parsing.
affects: all
deprecatedPython Fire 0.1.0 is very old (2018). It has known bugs and no active maintenance. Consider alternatives like Typer or Click.
fix
Migrate to Typer (pip install typer) for modern CLI generation.
affects: 0.1.0
Errors
Common errors & fixes
'Fire' object is not callable
Importing Fire incorrectly as a class or attribute from fire module.
fix
Use 'import fire' then call 'fire.Fire(function)'.
TypeError: 'str' object is not callable
Fire may interpret a class's __init__ as the default command but return a string when instantiated, causing confusion.
fix
Use classes with Fire by calling fire.Fire(ClassName) and ensure methods return strings or use --help.
Upgrade
Version history
0.1.0latest on PyPI · released Jul 12, 2014
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
python-fire — pip install python-fire · libregistry