The official CloudCruise Python SDK
Actively maintained. Last release 3 weeks ago, commits in 13 of the last 26 weeks. A safe choice.
pip install cloudcruisecloudcruise-python
The official CloudCruise Python SDK for automated browser workflows, encrypted credential management, realtime run monitoring, and webhook verification.
Installation
pip install cloudcruise
Python 3.10 or newer is required. The package ships with type hints (py.typed).
Quick Start
from cloudcruise import CloudCruise, CloudCruiseParams, StartRunRequest
client = CloudCruise(
CloudCruiseParams(
api_key="<CLOUDCRUISE_API_KEY>",
encryption_key="<CLOUDCRUISE_ENCRYPTION_KEY>",
)
)
# Alternatively, set CLOUDCRUISE_API_KEY and CLOUDCRUISE_ENCRYPTION_KEY
# environment variables and instantiate with `client = CloudCruise()`.
run = client.runs.start(
StartRunRequest(
workflow_id="105b7ae1-ce62-4a5c-b782-b4b0aec5175a",
run_input_variables={"email": "test@example.com"},
)
)
# Listen to specific event types (recommended - clean and type-safe)
run.on("execution.start", lambda e: print(f"Workflow started: {e.payload['workflow_id']}"))
run.on("execution.step", lambda e: print(f"Step: {e.payload['current_step']}"))
run.on("execution.success", lambda e: print(f"Success! Output: {e.payload.get('data')}"))
run.on("end", lambda info: print(f"Run completed: {info['type']}"))
# Or use generic listener for all events (flattened structure)
# run.on("run.event", lambda event: print(f"{event.type}: {event.payload}"))
# Block until the run finishes and fetch final results
result = run.wait()
print(result.status, result.data)
Environment variables CLOUDCRUISE_API_KEY, CLOUDCRUISE_ENCRYPTION_KEY are also supported via lazy cloudcruise.client().