Getting Started
Minimal Survival Command
% pip install fired-up
An example
With Fired Up it is possible to run a command like this:
% python examples/hello.py generate a_reversed_list 1,a,2,b then dump as_json
[
"b",
2,
"a",
1
]
The code to achieve this would be something like this:
import json
from fired_up import FiredUp, Group
class Generator(Group):
def a_reversed_list(self, lst):
return list(reversed(lst))
class Dumper(Group):
def as_json(self):
return json.dumps(self.paste(), indent=2)
FiredUp(generate=Generator, dump=Dumper)
Fired Up provides the following support for creating a even “nicer” natural-ish command language:
a
Groupbase class allows for simply creating a functional class, that has access to aclipboardusing thecopyandpastemethods.a
FiredUptop-level class to bring together theGroupsand fire them upa
thenmethod onGroupsallows to exit theGroupscope and return to the top-levelFiredUpclass to access a differentGroup