Saturday, June 11, 2016

Python Flask Tutotials For Beginners Lesson 1 - install and set up Python Flask

Lesson 1 - install and set up Python Flask

Howdy folks after long time .i decided to start new tutorial series about, python Flask framework.in this tutorial series I'm going to teach you ,how to create video hosting flask web server with mango db ,Dockers ,apache reverse proxy and nginx reverse proxy.i hope you will learn a lot.OK lets start to work

things we needed
  • ubuntu
  • pycharm as development IDE
  • python 2.7 (im using python 2.7 version)Ubuntu have built-in python
  • Dockers
  • Apache2 or nginx im going to teach you both
  • Mongo DB
  • Open SSL for convert http to https
im going though all the lesson from very first beginning.

ok lets setup pycharm as our development IDE


Install pycharm

 go to jetbrains pycharm website https://www.jetbrains.com/pycharm/download/#section=linux and download professional or community version.

then extract it to anywhere you like then you can run PyCharm using bash pycharm.sh command to to do this you need to open extracted pycharm folder using terminal.you can use cd command to change the directory and go to pycharm folder then it will start the pycharm.


How to add Pycharm to Ubuntu Laucher


when you open pycharm. Icon is appear on ubuntu Launcher then right click on that icon and click lock to launcher.
and also goto Tools -->Create Desktop Entity 


How to install PIP in ubuntu


sudo apt-get update

sudo apt-get -y install python-pip

this will install pip for you.pip help you to install python modules easy.


How to install Docker in Ubuntu


sudo apt-get update

sudo apt-get install docker-engine

then start the docker daemon using

sudo service docker start

How to install Apache2 on Ubuntu

 Apache2 is the webserver and also apache2 can work as reverse proxy.i will discuss this later.

sudo apt-get update 

sudo apt-get install apache2 apache2-doc apache2-utils


How to install Nginx on Ubuntu

Nginx also web server like apache2.but nginx is light weight rather than apache2 .Nginx require low server requirement.and also memory consumption also lower than apache2.and also nginx can serve as webserver.reverse proxy and load balancer. 

sudo apt-get update

sudo apt-get install nginx


How to install Flask on ubuntu

now you have installed PIP in your ubuntu machine.so we need to install Python Flask on your Desktop so we use pip to install Flask for you.

open terminal and type

 

How To install Python Flask on ubuntu


pip install flask

flask is the micro framework.you can do anything using flask.it is lightweight.it include the core of the framework.

 

How to install Mongodb on Ubuntu

 

sudo apt-get update

sudo apt-get install -y mongodb-org



How to install Pymongo on ubuntu


now we need pymongo driver.to communicate flask app with mongo db

python -m pip install pymongo

ok now we are setup and install althe things we needed .so lets gets started.
see you in next tutorial

How to run your first flask application.

If you like this tutorial Please Share and leave a comment below 




No comments:

Post a Comment