Scout

Python SDK

Official Python client for Macro Scout — same surface as the TypeScript SDK. Publish to PyPI when the macrocontent organization is approved.

Status
Package lives in the monorepo as packages/scout-python (macrocontent-scout). Install from PyPI after the first publish; until then use editable install from the repo.

Install

pip
# After PyPI publish:
pip install macrocontent-scout

# From monorepo (dev):
cd packages/scout-python && pip install -e .

Quick start

example.py
import os
from macrocontent_scout import Scout

scout = Scout(api_key=os.environ["SCOUT_API_KEY"])

result = scout.assert_({
    "url": "https://example.com/pricing",
    "assert": [
        {"selector": "#buy", "visible": True},
        {"selector": ".price", "contains": "29"},
    ],
})

print(result["passed"], result["results"])

Use scout.assert_(…) or scout.check(…)assert is reserved in Python.

Also included

  • Screenshot / inspect / crawl / journey / checks / browser facts
  • ScoutError with code / retryable
  • wait_for_job polling
  • verify_webhook_signature