view alveo_api_key.py @ 15:3fd0f8f1f3ce draft

planemo upload for repository https://github.com/Alveo/alveo-galaxy-tools commit 63c347461a5d4fed06799e1d3b699e0d30b48191
author stevecassidy
date Thu, 16 Nov 2017 06:52:17 -0500
parents a38315ecf593
children 5e1b7d922ea3
line wrap: on
line source

from __future__ import print_function
import argparse
import sys
from util import write_key


def parser():
    p = argparse.ArgumentParser(description="Retrieves Alveo Item Lists")
    p.add_argument('--api_key', required=True, action="store", type=str, help="Alveo API key")
    p.add_argument('--output_path', required=True, action="store", type=str, help="File to store the API key in")
    return p.parse_args()


def main():
    args = parser()
    try:
        write_key(args.api_key, args.output_path)
    except Exception as e:
        print("ERROR: " + str(e), file=sys.stderr)
        sys.exit(1)


if __name__ == '__main__':
    main()