Show HN: Python micro event loop library (~250 LOC)

by tarrudaon 2/28/2025, 1:18 AMwith 12 comments

by vram22on 2/28/2025, 7:33 AM

It's 736 LOC now.

Last 2 lines, 735 and 736:

    # Start the event loop with the main coroutine
    event_loop(main())

by dnadleron 2/28/2025, 2:00 PM

I haven’t kept up with python too much over the past year or two and learned a couple new things from this code. Namely, match/case and generic class typing. Makes me wonder what else is new, off to the python docs!

by somesunon 3/1/2025, 5:59 AM

very good example to learn async , will try it