, ,

Build Session 2 – Python, Flask

(This Session occurred late November)

Wasn’t able to do a whole lot with the Compass interface for MongoDB; but it’s not really the method I’ll be using for manipulating data anyway . . . Moving on to the user interface side, and the web app itself!

After a little research, settle on Flask as a python web app framework. First need to set up a python environment; I’ve used Anaconda in the past and it seems like a good option here.

So I start up Anaconda, it wants to self update, hangs for like 10 minutes or so. Not sure if it was ever working . . . I just uninstalled and re downloaded a newer version.

So I start up Anaconda again, find the command line tool, install the flask and mongo packages that seem to be recommended for my use case. Start with copy pasting a bit of code from a guide, seems pretty simple for the most part.

I can see where basically everything is happening; the Jinja for loop took a second to follow, and the get/post http sections in particular are a little fuzzy to some degree.

I modified the code by basically copying what exsited for the to-do list example to do the same from my tracks database on the local mongo instance.

Currently have been editing plain text files with notepad. One of the next steps is to look into an IDE or at least a more advanced text editor as I move forward with building.

I should also be able to begin filtering the Mongo database query results; I can see .find() being used, I should be able to apply some filters to the query language that’s being used pretty easily.