windmill
windmill copied to clipboard
feature: Support calling async main python functions directly
Please support calling async python function directly for Apps or scripts. Currently you have to wrap it in a asyncio.run. This would be a big quality-of-life improvements because most of our library scripts are in async.
Looks like another request from Discord earlier: https://discord.com/channels/930051556043276338/1180439258683691008/1180439258683691008
We haven't implemented it yet but to anyone finding this, you can run async def function in windmill, but you have to wrap them first:
import asyncio
def run main():
asyncio.run(async_main())
async def async_main():
...your_code