Build a Flask-Python web App


Building a dynamic website made so easy with Python -Flask, a Micro FrameWork which helps us to create the websites like Twitter and even more. Forget about the complicated web programming languages, start learning Python. So where you start, Python or Flask ?. I should say, you have to learn basics of how Python first, just have a look at Python.org

IDE

Which IDE I should choose? IDE helps you to write, compile, build programs. Pycharm is a good choice, Visual Studio also had added the feature for Python programmers in their 2013 edition onwards. You can Google it for more options. I Prefer Pycharm.

Flask and Web, How it works?

Flask arranges web pages as basic URL or routes.  Let’s take a look at the Pycharm App code.

from flask import Flask
app = Flask(__name__)

@app.route(‘/’)
def hello_world():
return ‘Hello World!’

if __name__ == ‘__main__’:
app.run()

When the Index page is loaded the @app.route(‘/’) will be fired with an initial page. You can create as much as routes you want to say ‘/blog’, ‘/news/ etc.

 

1 thought on “Build a Flask-Python web App

  1. Pingback: Create and read simple JSON_STRING in Android Studio | DeveloperM – A developer's Manual

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.