Skip to content

Integration

Integrate Alloy with common Python libraries and HTTP (6–10 minutes).


Example (pandas)

from alloy import command

@command(output=list[dict])
def csv_to_api(rows: list[dict]) -> str:
    return "Map rows to API shape with keys: fullName, emailAddress, tier"

rows = [{"name": "Ada", "email": "ada@example.com", "plan": "pro"}]
print(csv_to_api(rows))

Expected: a list of dicts shaped for your API.

Tips

  • Add ImportError guards with clear install tips for optional deps.
  • Keep endpoints idempotent; validate inputs and cap token budgets.