Hynek this looka awesome i'll definitely use stamina in some projects i was already using Tenacity but just setting retries to 3 but your video convinced me i need a little better tuning! appreciate it and love your videos!
"I care a lot about automated testing, because I don't trust myself to write correct code, and if I did by accident, I don't trust myself to not break it in the future." - Hynek 2024 Pure poetry, I love it. ^^
This is amazing. I like that Stamina has nicer defaults than Tenacity. The type hints are an added bonus. One question: when you say loops can’t handle exceptions, I was wondering what that means. We can use a try...except in loops, can’t we? Could you please point to a resource that explains why the context manager within the iterator helps here?
YOU can use a try-except but the whole point of stamina (and Tenacity) is that we handle the errors automatically for you. I guess we could do something like `try: whatever() except Exception as e: attempt.handle()` but that's no way better than wrapping it into a context manager.
Good stuff. Usually I write a simple basic retry decorator with all the things you've mentioned instead pip installing another library. Not sure if I'll end up using it, but I'll check it out :)
Heh I’ve done it manually before too; the only thing that can get tricky is proper backoff computation. Fortunately there’s boltons with its drop-in-friendly design: boltons.readthedocs.io/en/latest/iterutils.html#boltons.iterutils.backoff_iter (I.e: no installation needed)
If you're concerned about engagement with the youtube algorithm just do an aesthetic desk setup video where you talk about all the python packages you have installed in ~/.local while slow-panning over the logitech MX master, the CalDigit TS4, an ultrawide monitor and a macbook in clamshell mode in a vertical stand. Bonus points if it's *your* desk, but honestly that's probably not necessary
Hynek this looka awesome i'll definitely use stamina in some projects i was already using Tenacity but just setting retries to 3 but your video convinced me i need a little better tuning! appreciate it and love your videos!
"I care a lot about automated testing, because I don't trust myself to write correct code, and if I did by accident, I don't trust myself to not break it in the future." - Hynek 2024
Pure poetry, I love it. ^^
the secret is to know one's limits 🧘♂️
New Hynek video dropped! Love the library, will be trying it out soon!
cool library. will probably use
Stamina is great! I love that now I'm getting paged 3 times with jittered, exponential backoff. ;D
Just like with food, there's *good* and *bad* paging!!1!
thank you, Jason Segel of Python
oof man i wish i had his hair ;)
This is amazing. I like that Stamina has nicer defaults than Tenacity. The type hints are an added bonus. One question: when you say loops can’t handle exceptions, I was wondering what that means. We can use a try...except in loops, can’t we? Could you please point to a resource that explains why the context manager within the iterator helps here?
YOU can use a try-except but the whole point of stamina (and Tenacity) is that we handle the errors automatically for you. I guess we could do something like `try: whatever() except Exception as e: attempt.handle()` but that's no way better than wrapping it into a context manager.
Great video, thanks !
Good stuff. Usually I write a simple basic retry decorator with all the things you've mentioned instead pip installing another library. Not sure if I'll end up using it, but I'll check it out :)
Heh I’ve done it manually before too; the only thing that can get tricky is proper backoff computation. Fortunately there’s boltons with its drop-in-friendly design: boltons.readthedocs.io/en/latest/iterutils.html#boltons.iterutils.backoff_iter (I.e: no installation needed)
If you're concerned about engagement with the youtube algorithm just do an aesthetic desk setup video where you talk about all the python packages you have installed in ~/.local while slow-panning over the logitech MX master, the CalDigit TS4, an ultrawide monitor and a macbook in clamshell mode in a vertical stand. Bonus points if it's *your* desk, but honestly that's probably not necessary
Or do that distributed retry budgets video. 3 hour runtime easy, super high retention because every way to get it wrong is a cliffhanger
I mean I own some of those things, but I'll need a lot more views to upgrade my TS3 to a TS4 and get a new monitor - like and subscribe everybody!
@@glyph_official i think i'll need to figure out how to switch my LEDs to purple first