Get the latest tech news
Tinyio: A tiny (~200 line) event loop for Python
Ever used asyncio and wished you hadn't? A tiny (~200 lines) event loop for Python. - patrick-kidger/tinyio
tinyio is a dead-simple event loop for Python, born out of my frustration with trying to get robust error handling with asyncio. This is an alternative for the simple use-cases, where you just need an event loop, and want to crash the whole thing if anything goes wrong. Synchronous functions can be ran in threads using tinyio.run_in_thread(fn, *args, **kwargs), which returns a coroutine you can yield on:
Or read this on Hacker News