"""Arithmetic example only; not a performance or production-cost forecast.
Rates from the Strands Agents case study dated 2026-11-09 (USD).
Other infrastructure, tax, staffing, quality, and peak capacity are excluded.
"""
import argparse
from decimal import Decimal, InvalidOperation

def positive_decimal(text):
    try:
        value = Decimal(text)
    except InvalidOperation as exc:
        raise argparse.ArgumentTypeError("Enter a finite positive number") from exc
    if not value.is_finite() or value <= 0:
        raise argparse.ArgumentTypeError("Enter a finite positive number")
    return value

def positive_integer(text):
    try:
        value = int(text)
    except ValueError as exc:
        raise argparse.ArgumentTypeError("Tickets must be a positive integer") from exc
    if value <= 0:
        raise argparse.ArgumentTypeError("Tickets must be a positive integer")
    return value

parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--tickets", type=positive_integer, required=True)
parser.add_argument("--instance-hours", type=positive_decimal, required=True,
                    help="Sum of all running instance-hours")
args = parser.parse_args()
print(f"api_usd={Decimal(args.tickets) * Decimal('0.0222'):.2f}")
print(f"instance_usd={args.instance_hours * Decimal('1.408'):.2f}")
