I think this can also working with any python 3.x versions.
Flask is a microframework for creating web applications.
First you need to install your python 3.4 and then you will get the pip script from here.
About pip you can read more on the pip webpage.
Run the pip install:
Go to into your Python folder and start the pip installation of Flask python module.
C:\Python34\Scripts>pip install Flask
This is the first step. The next step is to start the default webpage.
Using python command shell you can test the Flask python module.
>>> from flask import Flask
>>> app = Flask(__name__)
... def homepage():
... return "Hi there, how ya doin?"
>>> if __name__ == "__main__":
* Running on http://127.0.0.1:5000/
127.0.0.1 - - [26/Sep/2014 23:25:01] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [26/Sep/2014 23:25:02] "GET /favicon.ico HTTP/1.1" 404 -
As you can see is running into browser at http://127.0.0.1:5000 .
Let's put this into one python script.
You need to make a new folder called
FlaskAppand go to this folder.
Make a new script named
app.pywith the source code you tested.
Now you can just run the script and all will be working well.
Flask looks for template files inside the
Go to the folder
FlaskAppand create a folder called
Now, create a file called
index.htmland fill with you html source code.
To call this
index.htmlyou need to add this line of source code ino your script:
from flask import Flask, render_templateand
Start your python script and you will see the content of your