Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

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 




Wednesday, December 30, 2015

Google Search Library For Python Xgoogle

Google Search Module For Python 2.7

It is difficult to find good google search module for python but 
xgoogle is a good package.In this video  I'm demonstrating how to Use xgoogle in ubuntu




Friday, September 11, 2015

ONLINECLASSES No13 How to install scapy on python 3

ONLINECLASSES No13 pip3 install scapy-python3

in this video tutorial. im going to show you how to install scapy on python 3 easily
 hope you enjoy my tutorial
if you learn something from this
please share and like


Friday, September 4, 2015

ONLINECLASSES No11 How to install Beautiful Soup Python HTML parser and LXML Easy way

ONLINECLASSES No11 How to install Beautiful Soup Python HTML parser and LXML Easy way 

hello i have created tutorial to how to install Beautifulsoup HTML parser and LXML in easy step.
Beautifulsoup is the html parser that help you to get website content to your python projects.
here is the video tutorial
enjoy

Monday, August 24, 2015

ONLINECLASSES No9 how to install NLTK using pip install nltk

ONLINECLASSES No10

hello there
in this tutorial im going to show you some easy way to install nltk framework for natural language processing .nltk is the framework that you can easily analyse the natural language to computer understandable language.im not going to talk about NLP here because its huge area.i like to share my knowledge with you i'm hoping to provide simple NLP tutorial lessons in future.
wel lets go to work


how to install NLTK in python 3.4 in windows computer


first you need to setup pip(python installer package).here is the my previous tutorial about install pip module in windows computer
http://hackkat.blogspot.com/2015/08/how-to-install-pippython-installer.html

now its easy open command prompt in administrative mode

click on image to better view





then type pip install nltk and then press enter



that's is now its started to download and it will automatically install NLTK module in to your computer
you can verify if it is installed or not by typing import nltk in python IDE if its shows no errors you have successfully install NLTK
Have a good day
please if you like this post share on facebook twitter,if you have any question please leave a comment below
#installnltkusingpip,#pipinstallnltk,#nltk,#nlppython


ONLINECLASSES No 8How to install pip(python installer Package)

ONLINECLASSES No8 pip install

hello there.how are you hope you are fine in today lesson i'm going to teach a simple lesson .its about
pip install.in python 2.7 version there is no inbuilt pip so we need to configure the pip in to our computer but in python 3.x versions its contain the pip module by default. That's means you don't need to install pip separately.

usefulness of pip

when you are setup pip you can easily install python modules in few types

ok then lets go to work

first you need to download python latest version from this link https://www.python.org/downloads/

after that install python 
then you have done
 but when you are considering about the pip .there is still problem because our computer doesn't know where is the pip is exact location of pip so we have to go to the python folder and script folder see image below




then copy link address

in my computer its c://python34/script


then you have to go to system variables for that right click on my computer go to properties and then go to advance settings then environmental variables






then you can see the variable name path then select it and click edit then you get new window and be careful not to delete any thing in here at the end of the line just put ; mark and then past the link that you copied here is the screenshot of mine you can easily understand



then click ok  and you are ready to go
 then open command prompt and type pip if all the things are OK then you can get all the modules you can use with pip

thanks for watching if you are like my tutorial please share in Facebook,twitter and if you have any question about my tutorial please leave a comment
have a good day
by
Sameera Dissanayaka

#pipinstall,#howtoinstallpipinpython3.4,#pythonforbeginners,#hackkatpython

Wednesday, August 12, 2015

ONLINECLASSES No7 How to install FeedParser in Python

ONLINECLASSES No7

Hi friends today im going to show how to install FeedParser Python library for RSS feed parsing
its easy

Go to command prompt and type

pip install feedparser

some times you will get error because PIP is not installed in your system but in python 2.7 pip did not came along.but python 3.x version embedded with the pip (python installer package)
you have to do easy step
go to your python installed directory and open Lib folder and copy the addres path then
go to my computer and right click then go to properties
advance system settings then environmental variables then path and click edit then at the edn of line type ; semi colon and then past the copied path
just like java path setup
then click OK and then you can open cmd and type pip if it work you get long message



#feedparser, #pythonfeed,#pythonrssfeed #beautifulsoup