Back

Async Python Functions

  • 0
  • Functions
ZachHandley
27 Oct, 2023, 20:17

Simple question, with a probable simple answer but I wanted to ask, to run asynchronous python functions all I need to do is use asyncio yeah? If so, they should be set that way by default IMO

TL;DR
You can use asyncio to run asynchronous Python functions. By default, they are not set to be asynchronous. Make sure to include the asyncio library and use the async keyword before defining the function.
Drake
27 Oct, 2023, 21:43

You probably can use asyncio. I'm not familiar with how to use it, though.

See open-runtime's source code: https://github.com/open-runtimes/open-runtimes/blob/4044ed47c488e269a66fc381748f3af1e179e60b/runtimes/python-3.10/src/server.py#L155-L158

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more