I really would recommend to use the #trio library instead of #asnycio. (trio.readthedocs.io)
Nathaniel also wrote a generic essay about goto/callback and his nursery concept.( https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/) But if you would like to go with the (more common) asyncio library, have a look at https://realpython.com/async-io-python/
@olkol I tend to go with the "established" way of doing things, regardless of any hype, but thank you for the pointer, I might try that
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.