I am actually surprised why it is not already there? Please correct me if I am wrong, but is not totp like easier to implement than the other oauths listed? (iirc, it has something to with current seconds since epoch, some integer divide by 30 (or 60) and a cipher, and that is part of pair or something)
I tried to lookup, and found https://pyauth.github.io/pyotp/. I do not know what is piefed's policy on using readymade libraries (i know they are really lean on stack, but if i am not wrong, this library would be really light, and will likely just need a database to store the key (likely the passwords db)
here is the src code for above lib - https://github.com/pyauth/pyotp