The official CloudCruise Python SDK for automated browser workflows, encrypted credential management, realtime run monitoring, and webhook verification.
pip install cloudcruisePython 3.10 or newer is required. The package ships with type hints (py.typed).
from cloudcruise import CloudCruise, StartRunRequest
client = CloudCruise(
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().
| Client | Description | Module Docs |
|---|---|---|
| Vault | AES-256-GCM credential storage and retrieval utilities | cloudcruise.vault |
| Workflows | Workflow definitions, metadata, and input validation | cloudcruise.workflows |
| Runs | Workflow execution with SSE-based realtime streaming | cloudcruise.runs |
| Webhook | Webhook payload verification and helpers | cloudcruise.webhook |
All clients are accessible via CloudCruise or the convenience cloudcruise.client() singleton.
This project uses standard Python tooling with setuptools. See
CONTRIBUTING.md for comprehensive instructions.
Quick start:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]" # installs package + dev dependencies
# Run the unit test suite
python -m unittest discover -s tests -p "test_*.py" -vFor live staging tests, export CLOUDCRUISE_API_KEY and
CLOUDCRUISE_ENCRYPTION_KEY, then run python -m unittest tests/test_live_staging.py -v.
- API Documentation – Full platform reference
- CloudCruise Platform – Product overview
- Agents & Assistant Context – How this repository’s automation assistant operates