Coding

Python Fire – library for automatically generating command line interfaces

Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.

It’s called Fire because it fires off (executes) your command.

This is free and open source software.

Key Features

  • Simple way to create a CLI in Python. Simply write the functionality you want exposed at the command line as a function / module / class, and then call Fire. With this addition of a single-line call to Fire, your CLI is ready to go.
  • Helpful tool for developing and debugging Python code. If you simply call Fire in your library, then you can run all of it’s functionality from the command line without having to keep making changes to a main method.
  • Exploring existing code or turning other people’s code into a CLI. You can take an existing module, maybe even one that you don’t have access to the source code for, and call Fire on it. This lets you easily see what functionality this code exposes, without you having to read through all the code.
  • Makes transitioning between Bash and Python easier. Using Fire lets you call Python directly from Bash. So you can mix your Python functions with the unix tools you know and love, like grep, xargs, wc, etc.
  • Makes using a Python REPL easier by setting up the REPL with the modules and variables you’ll need already imported and created. When you use the –interactive flag to enter an IPython REPL, it starts with variables and modules already defined for you. You don’t need to waste time importing the modules you care about or defining the variables you’re going to use, since Fire has already done so for you.

Website: github.com/google/python-fire
Support: Documentation
Developer: Google Inc.
License: Apache License, Version 2.0

Python Fire is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Command-Line Python Application Development Tools
Python FireLibrary for automatically generating command line interfaces
argparseParser for command-line options, arguments and sub-commands
ClickCreate beautiful command line interfaces in a composable way
TyperLibrary for building CLI applications
RichPython library for rich text and beautiful formatting
alive-progressProgress bar, with real-time throughput
GooeyConvert console programs into end-user-friendly GUI software
Python Prompt ToolkitBuild powerful interactive command line and terminal applications
tqdmFast, extensible progress bar for Python and CLI
AsciimaticsCreate full-screen text UIs from interactive forms to ASCII animations
CementCLI application framework for Python
docoptCommand-line interface description language
cliffFramework for building command line programs
CycloptsFramework for building command-line interfaces

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted