My usual thought when I see “XXX in only YY LoC” is to ask what packages are imported and just how large are those? But after reading this I didn’t care there’s another 180 lines of magic imported from hmac because of how great the documentation is.
This is seriously worth a read, whether or not you are writing in python (I generally don’t) or care to play code golf (occasional pasttime). The README.md is 700 lines to explain everything about the 20 LoC in the implementation, and the tests are a further 80 LoC. That means you’ll learn a lot from this about TOTP in general and, if you’re a Python user, all the ways you can make use of this for your own code.
Thanks for sharing!
Thanks for posting this reply, because I was going to potentially skip it for the same reason - I’m glad I didn’t!
Thank you for the kind words and appreciating the documentation.