Adds argument parser support in default template.
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import bonobo
|
import bonobo
|
||||||
|
|
||||||
|
|
||||||
def extract():
|
def extract():
|
||||||
"""Placeholder, change, rename, remove... """
|
"""Placeholder, change, rename, remove... """
|
||||||
yield 'hello'
|
yield 'hello'
|
||||||
@ -46,5 +47,6 @@ def get_services():
|
|||||||
|
|
||||||
# The __main__ block actually execute the graph.
|
# The __main__ block actually execute the graph.
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Although you're not required to use it, bonobo's graph related commands will hook to this call (inspect, run, ...).
|
parser = bonobo.get_argument_parser()
|
||||||
|
with bonobo.parse_args(parser):
|
||||||
bonobo.run(get_graph(), services=get_services())
|
bonobo.run(get_graph(), services=get_services())
|
||||||
|
|||||||
Reference in New Issue
Block a user