State-Aware Watchers

Watch any API or webpage.
Alert only when it changes.

Stateless cron jobs spam you every run. LiteLambda gives your Python script persistent Key-Value storage so you can compare current vs previous values and only alert on real deltas.

Traditional Stateless Cron

Spams on Every Execution

Lacks memory. Every 15 minutes it checks the price, sees it's $99, and sends an alert. You wake up to 96 identical messages in Slack.

# Run 1: Sends Slack message ($99)
# Run 2: Sends Slack message ($99)
# Run 3: Sends Slack message ($99)
LiteLambda with Built-in KV

Alerts Only When Changed

Saves state to context.kv. Compares current value against last run. Only fires webhooks when price drops or conditions match.

# Run 1: Saves $99 to KV (Silent)
# Run 2: Still $99 → Skipped
# Run 3: Price dropped to $79 → 🔥 ALERT SENT
price_monitor.py • Automatic pip packages included Runs Every 15 Mins
import requests, os

def handler(event, context):
    # 1. Fetch current price from target API
    data = requests.get("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd").json()
    current_price = data["bitcoin"]["usd"]
    
    # 2. Retrieve previous value from built-in KV Store
    last_price = context.kv.get("last_btc_price", current_price)
    
    # 3. Calculate percentage difference
    diff = ((current_price - last_price) / last_price) * 100
    
    if abs(diff) >= 2.0:
        msg = f"🚨 BTC moved {diff:+.2f}%! Current: ${current_price:,.2f}"
        requests.post(os.environ["TELEGRAM_ALERT_URL"], json={"text": msg})
        
    # 4. Save state for next execution
    context.kv.set("last_btc_price", current_price)
    return {"price": current_price, "delta_pct": diff}

Native Failure & Alert Integrations

Receive instant notifications with stack traces when your watchers throw errors or selectors break.

Discord Webhook alerts
Telegram Bot notifications
Slack Incoming webhooks
Email Instant stack traces

Deploy your stateful watcher in minutes

15-day trial included. 100 free executions. Zero credit card needed.

Start 15-Day Free Trial →