Skip to main content

The official CloudCruise Python SDK

Project description

cloudcruise-python

MIT License PyPI - Version PyPI - Downloads GitHub Repo stars Discord YC W24

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, 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().


Clients

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.


Development

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" -v

For live staging tests, export CLOUDCRUISE_API_KEY and CLOUDCRUISE_ENCRYPTION_KEY, then run python -m unittest tests/test_live_staging.py -v.


Documentation & Resources


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudcruise-0.0.4.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloudcruise-0.0.4-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file cloudcruise-0.0.4.tar.gz.

File metadata

  • Download URL: cloudcruise-0.0.4.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for cloudcruise-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f777fc1e8cba4ae4a9eb7a1bc7b725fe1bab69f6c8dbfc62e9ba98c8d317a90c
MD5 2b1b63b2c7444ec02f285a02fc5b5eff
BLAKE2b-256 aa3eb80b8fac4b24c5073f02762087546705ddc126e0879d36518d04fab006a2

See more details on using hashes here.

File details

Details for the file cloudcruise-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cloudcruise-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for cloudcruise-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 edea34d229fd28dea8e2bbfdcc154387a7854886ca4001bb850e7d9f25a762b6
MD5 672772a9034a559a9d8da6a6de7f5946
BLAKE2b-256 4b4fca91789570d5e0a202aa68376eeb0777c9a18c28d7c487cd1aa1a5ae7ccc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page