mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-27 03:40:16 -06:00
Fe overhaul docs (#1640)
* api changes * doc changes * move docs * generated * generate * pkg * backmerge main * revert to main * revert main * race? * remove go tests
This commit is contained in:
18
examples/python/api/api.py
Normal file
18
examples/python/api/api.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from hatchet_sdk import Hatchet
|
||||
|
||||
hatchet = Hatchet(debug=True)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
workflow_list = hatchet.workflows.list()
|
||||
rows = workflow_list.rows or []
|
||||
|
||||
for workflow in rows:
|
||||
print(workflow.name)
|
||||
print(workflow.metadata.id)
|
||||
print(workflow.metadata.created_at)
|
||||
print(workflow.metadata.updated_at)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
20
examples/python/api/async_api.py
Normal file
20
examples/python/api/async_api.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import asyncio
|
||||
|
||||
from hatchet_sdk import Hatchet
|
||||
|
||||
hatchet = Hatchet(debug=True)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
workflow_list = await hatchet.workflows.aio_list()
|
||||
rows = workflow_list.rows or []
|
||||
|
||||
for workflow in rows:
|
||||
print(workflow.name)
|
||||
print(workflow.metadata.id)
|
||||
print(workflow.metadata.created_at)
|
||||
print(workflow.metadata.updated_at)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user