Fix: Python docs examples (#2255)

* feat: client example

* fix: batch i

* fix: batch ii

* fix: batch iii

* fix: batch iv
This commit is contained in:
matt
2025-09-05 15:08:23 -04:00
committed by GitHub
parent 8c85f47cd8
commit 4a50e454a6
46 changed files with 404 additions and 275 deletions
+9
View File
@@ -0,0 +1,9 @@
# > Schedule a Task
from examples.simple.worker import simple
from datetime import datetime
schedule = simple.schedule([datetime(2025, 3, 14, 15, 9, 26)])
## 👀 do something with the id
print(schedule.id)
@@ -0,0 +1,9 @@
from examples.simple.worker import simple
from hatchet_sdk import TriggerWorkflowOptions
# > Trigger with metadata
simple.run(
options=TriggerWorkflowOptions(
additional_metadata={"source": "api"} # Arbitrary key-value pair
)
)
+6
View File
@@ -0,0 +1,6 @@
from hatchet_sdk import Hatchet
hatchet = Hatchet()
# > Define a workflow
simple = hatchet.workflow(name="example-workflow")