# Path: alertaclient/utils.py
# def origin():
#     prog = os.path.basename(sys.argv[0])
#     return f'{prog}/{platform.uname()[1]}'


import json
import click
from datetime import datetime, timedelta
from tabulate import tabulate
from alertaclient.utils import origin




@click.command('keys', short_help='List API keys')
@click.option('--alert', is_flag=True, help='Alert on expiring and expired keys')
@click.option('--maxage', metavar='DAYS', default=7, type=int, help='Max remaining days before alerting')
@click.option('--timeout', metavar='SECONDS', default=86400, type=int, help='Seconds before expired key alerts will be expired')
@click.option('--severity', '-s', metavar='SEVERITY', default='warning', help='Severity for expiring and expired alerts')
@click.pass_obj

# Path: alertaclient/utils.py
# def origin():
#     prog = os.path.basename(sys.argv[0])
#     return f'{prog}/{platform.uname()[1]}'


# Path: alertaclient/commands/cmd_keys.py
import json
import click
from datetime import datetime, timedelta
from tabulate import tabulate
from alertaclient.utils import origin





@click.command('keys', short_help='List API keys')
@click.option('--alert', is_flag=True, help='Alert on expiring and expired keys')
@click.option('--maxage', metavar='DAYS', default=7, type=int, help='Max remaining days before alerting')
@click.option('--timeout', metavar='SECONDS', default=86400, type=int, help='Seconds before expired key alerts will be expired')
@click.option('--severity', '-s', metavar='SEVERITY', default='warning', help='Severity for expiring and expired alerts')
@click.pass_obj

def cli(obj, alert, maxage, severity, timeout):