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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

155

Published on

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

Published in: Software, Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
155
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Simple web-app with python Flask + Python Nikita Penzin(Lozhnikov)
  • 2. … is a widely used general-purpose, high-level programming language - http://python.org Python
  • 3. The creator Guido Van Rossum (1956 - …) Employment: Google, Dropbox “There is one way to do it right ...if you aren’t Dutchman”
  • 4. 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
  • 5. 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 ...
  • 6. 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
  • 7. Flask Flask is a microframework for Python web-apps. http://flask.pocoo.org/ created by Armin Ronacher
  • 8. 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>
  • 9. 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
  • 10. Credits https://www.python.org/ http://flask.pocoo.org/ https://github.com/npenzin https://twitter.com/npenzin mailto: mail@mainpart.in Any questions?

×