This is using steem-js, yes. For python, I would recommend using the official steem-python library here: https://github.com/steemit/steem-python
There's also some excellent documentation for it here: http://steem.readthedocs.io/en/latest/
What library are you using that does what you have described?
The first likn you provided. Puthon official steem api. And steemjs to check provided username and key until server goes for it.you know you have to avoid as much thing as you can to do on your server.