Python and Flask introduction for my classmates Презентация и введение в flask
Upcoming SlideShare
Loading in...5
×
 

Python and Flask introduction for my classmates Презентация и введение в flask

on

  • 80 views

Python and flask 30 min introduction for students who have never seen anything except Delphi and Java

Python and flask 30 min introduction for students who have never seen anything except Delphi and Java

Statistics

Views

Total Views
80
Slideshare-icon Views on SlideShare
80
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Python and Flask introduction for my classmates Презентация и введение в flask Python and Flask introduction for my classmates Презентация и введение в flask Presentation Transcript

    • Simple web-app with python Flask + Python Nikita Penzin(Lozhnikov)
    • … is a widely used general-purpose, high-level programming language - http://python.org Python
    • The creator 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 Readability counts
    • Features ● 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 ...
    • Examples print 'Hello, world!' >>> Hello, world! def fib(n): if n < 2: return n return fib(n-2)+fib(n-1) print fib(7) >>> 13 a = 3 b = ‘hello’ print b * 3 >>> hellohellohello
    • Flask Flask is a microframework for Python web-apps. http://flask.pocoo.org/ created by Armin Ronacher
    • Flask based ‘Hello, world!’ app 1. Connect to a ‘flask’ wifi-hotspot from your devices 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>
    • Explanation flask.py --------------------------------- 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 def hello(): return "Hello World!" @app.route("/<text>") def hello_user(text): return text app.run(host=’0.0.0.0’) < call the run method on app
    • Credits https://www.python.org/ http://flask.pocoo.org/ https://github.com/npenzin https://twitter.com/npenzin mailto: mail@mainpart.in Any questions?