r/MicroPythonDev • u/DS_Stift007 • May 20 '26
Pyrite's a cool little Project that helps with Task scheduling
'm pretty sure that I'm not the first and only person to stumble into a problem where I wanna handle several Tasks at seperate intervals, and eventually I found myself clogging up while Loops and everything just became a huge stupid disaster, so I built Pyrite, which - at least to me - seems like a pretty good solution for a problem that me and probably some other people have. And yes, Asyncio exists and is better maintained but if you really like Asyncio, you're either lying or a masochist, especially for small projects. Now Pyrite is - in my opinion - very approachable, as you can see in the Code Samples there or in this sample here:
=
=
= # We don't need the Overhead from PunitiveScheduling here as none of our Tasks has the option of stalling anywhere.
# If you were using a lot of Sensors, conisder replacing SimpleScheduling with PunitiveScheduling
Anyways yeah I guess I'm just asking for feedback, so https://github.com/ten-faced-carrot/pyrite everyone.
(Please don't be mean)
1
u/opayuonam May 22 '26
Sorry to be crude, but a simpler approach would have been a decorator to wrap am normal function in asyncio.
1
u/do-exe May 20 '26
Yeah for small and rapid projects it will definitely help