def main():
parser = argparse.ArgumentParser()<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>required=True, help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>required=True, help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>', action='<STR_LIT:store_true>',<EOL>default=False, help='<STR_LIT>')<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>default=REQUESTS_TIMEOUT, help='<STR_LIT>')<EOL>args = parser.parse_args()<EOL>client = EboxClient(args.username, args.password, args.timeout)<EOL>loop = asyncio.get_event_loop()<EOL>task = loop.create_task(client.fetch_data())<EOL>try:<EOL><INDENT>loop.run_until_complete(task)<EOL><DEDENT>except PyEboxError as exp:<EOL><INDENT>print(exp)<EOL>client.close_session()<EOL>return<EOL><DEDENT>if not client.get_data():<EOL><INDENT>client.close_session()<EOL>return<EOL><DEDENT>if args.json:<EOL><INDENT>print(json.dumps(client.get_data()))<EOL><DEDENT>else:<EOL><INDENT>_format_output(args.username, client.get_data())<EOL><DEDENT>client.close_session()<EOL>
Main function