Google Cloud Workflows wrapper
Project description
Goblet Workflows (Beta)
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
To execute a workflow run
goblet_workflows execute
To execute a workflow run with an arg
goblet_workflows execute --arg '{"project_id":"PROJECT","var1":"xx"}'
Examples
Features
- Generic Steps
- Branches
- Deployment of Workflows and Schedules
- GCP Connectors
- Execute Workflows
GCP Workflows
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
Built Distribution
File details
Details for the file goblet_workflows-0.1.4.tar.gz
.
File metadata
- Download URL: goblet_workflows-0.1.4.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89fedaad9958c00b5f041a4710605114e4efc156526edff6d7502d0fdd17ba8f |
|
MD5 | 9ce38e409144101ae9dd7570c9ff0a63 |
|
BLAKE2b-256 | 3cf629148189c847aadecc39124d8d96c2ce01a2466e2bb8bf82786ee32be061 |
File details
Details for the file goblet_workflows-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: goblet_workflows-0.1.4-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a11e1af769d9b7a66b4624ea38a182c871bfd7ed3595cd21370eff56bfd4997c |
|
MD5 | bfa0639b5b424e079964cc0a17ae4e49 |
|
BLAKE2b-256 | d4c1d51f424a3c06a60675bf86a822b45a405964ed5cf92344d0f55d66f431c9 |