[Python] Fix: Misc. Python Bugs (#1451)

* fix: stop trying to parse payloads back from json

* feat: streaming example

* feat: aio output

* fix: lint

* feat: sync and async examples

* fix: small issues

* fix: one more small thing

* chore: version

* fix: lint

* fix: add sleeps

* feat: factor out run_async_from_sync

* Revert "feat: factor out run_async_from_sync"

This reverts commit fb37395913.

* fix: schedule trigger namespace issue

* fix: log error if action payload fails to decode but don't raise out of listener
This commit is contained in:
Matt Kaye
2025-03-31 13:47:34 -04:00
committed by GitHub
parent ea5cdbada0
commit 8172d59f84
9 changed files with 92 additions and 31 deletions

View File

@@ -0,0 +1,19 @@
import asyncio
from examples.streaming.worker import streaming_workflow
async def main() -> None:
ref = await streaming_workflow.aio_run_no_wait()
await asyncio.sleep(1)
stream = ref.stream()
async for chunk in stream:
print(chunk)
if __name__ == "__main__":
import asyncio
asyncio.run(main())