Skip to main content

Google Cloud Workflows wrapper

Project description

Goblet Workflows (Beta)

PyPI PyPI - Python Version Tests codecov

Goblet Workflows is a wrapper around GCP Workflows, which is a fully-managed orchestration platform that executes services in an order that you define: a workflow. These workflows can combine services including custom services hosted on Cloud Run or Cloud Functions, Google Cloud services such as Cloud Vision AI and BigQuery, and any HTTP-based API.

While GCP Workflows is powerful, it requires learning a complex yaml DSL, which makes it hard to manage and scale, and has a steap learning curve to get started.

Goblet Workflows uses similar syntax that you can expect from airflow and prefect, to make it easy to write, deploy, and manager your workflows, while leveraging the severless nature of GCP workflows.

See below for a simple workflow example.

from goblet_workflows.workflow import Workflow
from goblet_workflows.steps import AssignStep, BQStep

w = Workflow("bigquery-step-example", params=["column"])

upack_args = AssignStep(
    w,
    "upack_args",
    column="${column}"
)

bq_step = BQStep(w, "bq_step", "select {column} from DATASET limit 1")

bq_step_2 = BQStep(w, "bq_step_2", "select colomn2 from DATASET2 where column1 = {bq_step[0]} ")

upack_args > bq_step > bq_step_2

Not to deploy you simply have to run the command goblet_workflows deploy, which will yield the workflow below.



Getting started

To install run:

pip install goblet_workflows

To deploy a workflow create a main.py file where you define your workflow and steps.

Then run

goblet_workflows deploy

To view the yaml run

goblet_workflows print

Examples

Goblet Workflow Examples

Features

  • Generic Steps
  • Branches
  • Deployment of Workflows and Schedules
  • GCP Connectors

GCP Workflows

Overview

Syntax Cheat Sheet

Issues

Please file any issues, bugs or feature requests as an issue on our GitHub page.

Roadmap

☑ Http Steps
☑ GCP Generic Connectors
☑ BQ Connector
☑ Dataform Connector
☑ Deploy
☑ Deploy Arbitrary File
☐ Execute
☐ Delete
☑ Schedule
☐ Conditions
☐ Subworkflows
☐ Parameter typing

Want to Contribute

If you would like to contribute to the library (e.g. by improving the documentation, solving a bug or adding a cool new feature) submit a pull request.

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

goblet_workflows-0.1.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

goblet_workflows-0.1.2-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file goblet_workflows-0.1.2.tar.gz.

File metadata

  • Download URL: goblet_workflows-0.1.2.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for goblet_workflows-0.1.2.tar.gz
Algorithm Hash digest
SHA256 55d2636641fa3eed31087e0fe6592707bddba726466bd5bb2ae82b48f6a1186b
MD5 a200cf9b8c0a5719cfaa0ca159d9bb7c
BLAKE2b-256 40603dfb6a752c3246392079d323dd34b396581ae257d497409699ea45ec3e5d

See more details on using hashes here.

File details

Details for the file goblet_workflows-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for goblet_workflows-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8488ec779c14f7ccc136c4f643e03c8df98c84d7aec411ae2222fd2a454d87e5
MD5 44f7aeafbe95c6b3271e84537e2d4fee
BLAKE2b-256 83967822b5148409ca4fc2ab743e52f059289de304e2e01bc7b9e6a2e0cdce70

See more details on using hashes here.

Supported by

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