cascade
Cascade is a library for submitting and managing jobs across multiple cloud environments. It is designed to integrate seamlessly into existing Prefect workflows or can be used as a standalone library.
Getting Started
Installation
uv add block-cascade
or
pip install block-cascade
Example Usage
from block_cascade import remote
from block_cascade import GcpEnvironmentConfig, GcpMachineConfig, GcpResource
machine_config = GcpMachineConfig("n2-standard-4", 1)
environment_config = GcpEnvironmentConfig(
project="example-project",
region="us-west1",
service_account=f"example-project@vertex.iam.gserviceaccount.com",
image="us.gcr.io/example-project/cascade/cascade-test",
network="projects/123456789123/global/networks/shared-vpc"
)
gcp_resource = GcpResource(
chief=machine_config,
environment=environment_config,
)
@remote(resource=gcp_resource)
def addition(a: int, b: int) -> int:
return a + b
result = addition(1, 2)
assert result == 3
Configuration
Cascade supports defining different resource requirements via a configuration file titled either cascade.yaml or cascade.yml. This configuration file must be located in the working directory of the code execution to be discovered at runtime.
calculate:
type: GcpResource
chief:
type: n1-standard-1
You can even define a default configuration that can be overridden by specific tasks to eliminate redundant definitions.
default:
GcpResource:
environment:
project: example-project
service_account: example-project@vertex.iam.gserviceaccount.com
region: us-central-1
chief:
type: n1-standard-4
Authorization
Cascade requires authorization both to submit jobs to either GCP or Databricks and to stage picklied code to a cloud storage bucket. In the GCP example below, an authorization token is obtained via IAM by running the following command:
gcloud auth login --update-adc
No additional configuration is required in your application's code to use this token.
However, for authenticating to Databricks and AWS you will need to provide a token and secret key respectively. These can be passed directly to the DatabricksResource object or set as environment variables. The following example shows how to provide these values in the configuration file.
For Developers
Using hermit for managing Python
When developing cascade, you can optionally use hermit to manage the Python executable used by cascade. Together with using uv to manage dependencies, this will ensure that your development environment is identical to other contributors. Follow the linked instructions for installing hermit and then you can create a virtualenv with Python@3.9 by running:
. ./bin/activate-hermit
Then, install the dependencies with uv:
uv sync
Metadata
Release files for block-cascade 3.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| block_cascade-3.3.0.tar.gz | 50.6 kB | With provenance | Details for block_cascade-3.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| block_cascade-3.3.0-py3-none-any.whl | Python 3 | none | any | Details for block_cascade-3.3.0-py3-none-any.whl |
Total release size: 106.4 kB
Release files / block_cascade-3.3.0.tar.gz
| Download URL | block_cascade-3.3.0.tar.gz |
|---|---|
| Size | 50.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f827cb67288c524d0116a00c8b1e756a8c70037c7a1bd490e0265f77616a775
|
|
BLAKE2b-256 checksum How to use checksums |
62ac7a8ab2aef6b687491c1b791e9a9e0d1ddda251f358951a4bc4fb5866c38b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 13, 2026.
Transparency logRelease files / block_cascade-3.3.0-py3-none-any.whl
| Download URL | block_cascade-3.3.0-py3-none-any.whl |
|---|---|
| Size | 55.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95e65108350676020c1da2078630139f0633fe5fefb38531a748379d5607e775
|
|
BLAKE2b-256 checksum How to use checksums |
3caa64675d50e822090e94ad553051c4f978e84afe88caa646caf885fbfd310a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 13, 2026.
Transparency logSecurity for block-cascade 3.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for block_cascade-3.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.