Category: Python

March 22, 2018

Iterables are something that you can iterate on or something out of which you can create an iterator object. Any iterable object can be converted to an iterator with the help of iter() method. Iterable can be finite like list, tuple, string, dictionary, set, etc and also be an infinite flow of data like open […]

Continue Reading
March 21, 2018

Instead of returning a single value, a function can generate an entire sequence of results if it uses the yield statement. A generator is almost exactly the same as a plain function and it can be used in exactly the same way as an iterator(something that we can iterate on). There is one definite sign […]

Continue Reading
March 21, 2018

In my previous article, I discussed 2 different types of OTP and the basics of generating an OTP with django-otp. In this article I am going to write about creating a TOTP object and using that to generate and verify a token. Let’s create a class TOTPVerification . Check this code below. You can run it […]

Continue Reading