This is the third episode of our flask series for dummies, and if you have not read our episode 2, please do so here , in our previous post on the second episode, we were able to set up our base folder which we called flaskonlineplatform which we would use to serve our files for the website we would be building, now we were also able to set up the virtual environment folder inside that folder, which would help us with certain configurations (which you really dont need to know for now).
Here now, we are going to go as far as installing flask and start coding, i know youre eager to code, but can you just chill and understand how this thing works? sincerely i want to go about coding, but i need to know stuff first. so what next?, we have our venv folder with the necessary files ,but there is one thing you need to know, we have a folder inside the venv folder which is called scripts, this folder contains our pip configuration files, now if you don’t know what pip is , please check this article on w3schools , now using this pip configuration files we are going to install flask, and other dependencies..
Before coding do this!
Before coding you need to install flask and other dependencies needed such as the flask-sqlalchemy, these are the two we would be using for now, when we would need other packages, they would be introduced and installed as well, so to install flask navigate to the scripts folder and run the command as below.
c:\users\N\desktop\flaskonlineplatform\venv> cd scripts c:\users\N\desktop\flaskonlineplatform\venv\scripts> pip install flask c:\users\N\desktop\flaskonlineplatform\venv\scripts> pip install flask-sqlalchemy
Once these commands are done, then flask and flask-sqlalchemy would be installed as a package.
Now we have flask installed together with jinja-2,Markupsafe, werkzeug and other packages which we would use for coding, furthermore there is a warning that Python 2.7 would be deprecated by jan 2020, but before that let’s play a little with it, next up is to install flask-sqlalchemy and then start coding.
c:\users\N\desktop\flaskonlineplatform\venv\scripts\pip install flask-sqlalchemy
The real codes now ! lets dive in
Now we are done with installing flask and sqlalchemy as part of what we need now, the next thing is to start coding real time, and for now we are done with explanations, lets do it!
check the next post to proceed as a flask Ninja.