mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-02 06:39:57 -06:00
* hotfix: add repository for npm publish * release(py-sdk): bump version * feat: expose generator * release: bump version
17 lines
400 B
Python
17 lines
400 B
Python
from hatchet_sdk import Hatchet
|
|
from dotenv import load_dotenv
|
|
import json
|
|
|
|
load_dotenv()
|
|
|
|
client = Hatchet().client
|
|
|
|
workflowRunId = client.admin.run_workflow("ManualTriggerWorkflow", {
|
|
"test": "test"
|
|
})
|
|
|
|
for event in client.listener.generator(workflowRunId):
|
|
print('EVENT: ' + event.type + ' ' + json.dumps(event.payload))
|
|
|
|
# TODO - need to hangup the listener if the workflow is completed
|