Python and Flask introduction for my classmates Презентация и введение в flask
Simple web-app with python
Flask + Python
… is a widely used general-purpose, high-level
programming language - http://python.org
Guido Van Rossum (1956 - …)
Employment: Google, Dropbox
“There is one way to do it right
...if you aren’t Dutchman”
The Zen of Python
Beautiful is better than ugly
Explicit is better than implicit
Simple is better than complex
Complex is better than complicated
● dynamic type system
● automatic memory management
● large and comprehensive standard library
● lots of implementations
● beautiful, understandable, powerful syntax
● easy to learn
● TOP employers use it : Google, Yandex ...
print 'Hello, world!'
>>> Hello, world!
if n < 2:
a = 3
b = ‘hello’
print b * 3
Flask is a microframework for Python web-apps.
created by Armin Ronacher
Flask based ‘Hello, world!’ app
1. Connect to a ‘flask’ wifi-hotspot from your
2. Open your browser
3. Get to 192.168.xxx.xxx/
4. Have fun: get to 192.168.xxx.xxx/any text
e.g. 192.168.xxx.xxx/<h1>Hello, class<h1>
from flask import Flask < import required modules
app = Flask(__name__) < create instance app of a class Flask
@app.route("/") < decorate method hello with app.route
return "Hello World!"
app.run(host=’0.0.0.0’) < call the run method on app