prefect-gcp
helps you leverage the capabilities of Google Cloud Platform (GCP) in your workflows.
For example, you can run flows on Vertex AI or Cloud Run, read and write data to BigQuery and Cloud Storage, and retrieve secrets with Secret Manager.
prefect-gcp
prefect-gcp
as an extra of prefect
.
If you don’t already have prefect
installed, it will install the newest version of prefect
as well.
prefect-gcp
with all additional capabilities, run the install command above and then run the following command:
prefect-gcp
services.
prefect_gcp
blocks.
service_account_info
vs service_account_file
The advantage of using service_account_info
, instead of service_account_file
, is that it is accessible across containers.If service_account_file
is used, the provided path must be available in the container executing the flow.prefect-gcp
with the BigQuery extra.
prefect_gcp
to upload a file to a Google Cloud Storage bucket and download the same file under a different filename.
GcsBucket
supports uploading and downloading entire directories.prefect-gcp
with the Secret Manager extra.
The code below writes a secret to the Secret Manager, reads the secret data, and deletes the secret.
prefect-gcp
SDK documentation to explore all of the capabilities of the prefect-gcp
library.