Get current user id in Flask
In case anybody runs into the same frustrating problem, the solution is quite straightforward. Wrap up external classes into functions and pass required variables as arguments, then use them to your heart's content.Just don't forget to return an instance of the class.