mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-04 07:39:43 -06:00
feat: python rest api (#223)
* feat: Adds a generated REST API client and exposes workflow methods for programmatic usage
This commit is contained in:
14
python-sdk/examples/api/api.py
Normal file
14
python-sdk/examples/api/api.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from hatchet_sdk import Hatchet, WorkflowList
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
hatchet = Hatchet(debug=True)
|
||||
|
||||
list : WorkflowList = hatchet.client.rest().workflow_list()
|
||||
|
||||
for workflow in list.rows:
|
||||
print(workflow.name)
|
||||
print(workflow.metadata.id)
|
||||
print(workflow.metadata.created_at)
|
||||
print(workflow.metadata.updated_at)
|
||||
Reference in New Issue
Block a user