Create Python Flask website on Pythonanywhere

Flask is one of the light weight Python Frame work which can be used to develop awesome website

Image result for flaskwith minimal coding. Take a look at the few Flask powered website, click here

For development purpose you can simply launch on project at a time in, a free python hosting website.

Create Web Application

Go to your dashboard and locate Web Tab and add a new Application.
Choose appropriate Flask and Python version and finish the project. Your Flask project resides in Mysite folder. Go to your file and edit and add few lines of code for adding more urls as follows
from flask import Flask
app = Flask(__name__)
def index():
return “Index Page!”

def post():
return “Post Page”

def about():
return “About the page”

def contact():
return “Contact us”

if __name__ == “__main__”:
app.debug = True

You can also use Console tab for advanced operations.

Let’s take a look at your flask — Index  — Post page  — contact page

Published by


A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.