Upnl 24th workshop kim jae chan

Slides:



Advertisements
Similar presentations
Python Hyunjong Lee. contents  Introduction  Syntax & data types  Tools  Python as CGI.
Advertisements

Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
“I drink my WSGI clear” A barebones introduction to Python Web Programming. 3/14/2011.
Web Development Methodologies Yuan Wang(yw2326). Basic Concepts Browser/Server (B/S) Structure Keywords: Browser, Server Examples: Websites Client/Server.
Django Web Framework 김형용, 이정민 Framework 2.1. Django High-level Python Web Framework Develop fast Automate the repetitive stuff Follow best practices.
Dj(T)ango with Python Ritika Virmani. What is Django? It’s not a Hawaiian dance Developed by Adrian Holovaty and Simon Willison Rapid Web Development.
Open Solutions for a Changing World™ Copyright 2005, Data Access WordwideElectos June 6-9, 2005 Key Biscayne, Florida Data Access Europe BV Eddy Kleinjan,
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Cloud computing lectures: Programming with Google App Engine Keke Chen.
A data retrieval workflow using NCBI E-Utils + Python Part II: Jinja2 / Flask John Pinney Tech talk Tue 19 th Nov.
Marc Ziss Z Consulting Code Name 'Oryx' Web application scaffolding Easy to dynamically display pages based on the data model of.
Putting What We Learned Into Context – WSGI and Web Frameworks A290/A590, Fall /16/2014.
from SimpleHTTPServer import SimpleHTTPRequestHandler import SocketServer httpd = SocketServer.TCPServer((‘’, 8000), SimpleHTTPRequestHandler) httpd.serve_forever()
Universiti Utara Malaysia Chapter 3 Introduction to ASP.NET 3.5.
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
Who uses it? MichaelMoore.com What's it all about? Rapid Development Clean, Pragmatic Design.
Introduction In The Name Of Allah, The Beneficent, The Merciful.
WEBMATRIX Microsoft Pranav Rastogi.
1.1 Introduction to Programming academy.zariba.com 1.
Python. By Jawad. What Is Python? Python is an open-source object-orientated scripting language. Python is good for embedding snippets to run a program.
First Indico Workshop WEB FRAMEWORKS Adrian Mönnich May 2013 CERN.
Django 101 By: Jason Sumner. Django Overview Django was started in 2003, released under BSD in 2005, and the Django Software Foundation was established.
Sudoku Taryn Wise. Operational Concepts and System Requirements Solve sudoku puzzles in a convenient way Have a notes option for number possibilities.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview How to create a first ASP.NET application.
Faster! Accelerating your business with blazing prototypes Drew
Introduction to Python Origins Nature of Python Importance of Python Example.
Selenium January Selenium course content  Introduction (Session-1)Session-  Automation  What is automation testing  When to go for automation.
CIS 375—Web App Dev II JavaScript I. 2 Introduction to DTD JavaScript is a scripting language developed by ________. A scripting language is a lightweight.
CIS 375—Web App Dev II ASP.NET 1 Getting Started.
 Packages:  Scrapy, Beautiful Soup  Scrapy  Website  
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Assignment 1 Anthony Sosso. The App SossoStats View player statistics for EA SPORTS NHL /r/ea_nhl clubs – Herpaderps, Puck Goes First, Reddit Aliens.
LECTURE 14 Web Frameworks. WEB DEVELOPMENT CONTINUED Web frameworks are collections of packages or modules which allow developers to write web applications.
 A readable, dynamic, pleasant,  flexible, fast and powerful language Introduction to Python.
CSCI 3100 Tutorial 2 Web Development Tools 1 HTML 5 & CSS 3 1.
 Lecture  Website language: ASP.net  Book name Beginning ASP.NET 4 in C# and VB 2.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
I NTRO TO W EB TECHNOLOGY Basic terms. C LIENT – S ERVER M ODEL a distributed communication between service requestors and service providers.
LECTURE 14 Web Frameworks. WEB DEVELOPMENT CONTINUED Web frameworks are collections of packages or modules which allow developers to write web applications.
HTML Structure & syntax
Dive into web development
Scripting - Client-side vs. Server-side Scripting
Development of Web Applications - Introduction
Department of Computer Science
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
Google Web Toolkit Tutorial
CS5220 Advanced Topics in Web Programming Course Overview
MonoGame and Windows 8.
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Do you know this browser?...
04 | Web Applications Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager.
Django in the real world
Web Development Using ASP .NET
Java Servlet Ziad A. Al-Sharif.
WEB PAGE AUTHORINHG AND DESIGNING
Lesson Objectives Aims You should know about: – Web Technologies
Intro to Web Development Links
Introducing the .NET Framework
RPi 2/3 GPIO + Web(Flask)
Flask Web Frameworks for Python
THE REAL WORLD APPLICATIONS OF PYTHON. INTRODUCTION Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum.
RESTful Web Services.
HTML Structure & syntax
CS5220 Advanced Topics in Web Programming Course Overview
Deploy ML in Data Product
Web Application Development Using PHP
Introduction to Computer Science
Presentation transcript:

Upnl 24th workshop kim jae chan Introduction to Flask Upnl 24th workshop kim jae chan

Flask

Python

Python werkzeug based

Python werkzeug based microframework

Python werkzeug based microframework

Python?

Guido van Rossum

Guido van Rossum

Guido van Rossum 2005-2012 Google

Guido van Rossum 2005-2012 Google 2013- Dropbox

Guido van Rossum Script

Guido van Rossum Script Easy

Guido van Rossum Script Easy Popular

def factorial(x): return x <= 0 and 1 or factorial(x-1) * x if __name__ == '__main__': print factorial(100)

def factorial(x): return x <= 0 and 1 or factorial(x-1) * x if __name__ == '__main__': print factorial(100) def factorial(x): return reduce(lambda x, y: x * y, range(1, x+1)) if __name__ == '__main__': print factorial(100)

def factorial(x): return x <= 0 and 1 or factorial(x-1) * x if __name__ == '__main__': print factorial(100) def factorial(x): return reduce(lambda x, y: x * y, range(1, x+1)) if __name__ == '__main__': print factorial(100) def factorial(x): result = 1 for i in range(1, x+1): result *= i return result if __name__ == '__main__': print factorial(100)

Python werkzeug based microframework

Werkzeug 벡ㅋ차이크 비슷하게 발음. 독일어로 ‘도구'라는 뜻

One of WSGI implementation

WSGI?

Web Server Gateway Interface

Web Server Python Application Python Framework

Web Server Python Application Python Framework Request

Web Server Python Application Python Framework Request Response

WSGI Request Python Application Web Server Python Framework Response WSGI는 약속. 이걸 구현한 것 중 하나가 werkzeug Response

Python werkzeug based microframework

Microframework

Micro + framework

Micro

django pip install django django-admin.py startproject <project_name> cd <project_name> coding.. python manage.py runserver

django ASP.NET Create project in Visual Studio. pip install django django-admin.py startproject <project_name> cd <project_name> coding.. python manage.py runserver ASP.NET Create project in Visual Studio. Many, many files are automatically created. But almost files are useless. coding.. Press F5 to debug

Flask pip install flask Open vim coding.. ??? PROFIT!

micro != lack of feature

micro != lack of feature start quickly

micro != lack of feature start quickly simple to use

micro != lack of feature start quickly simple to use structural flexibility

micro != lack of feature start quickly simple to use structural flexibility extendable

Examples

app.py from flask import Flask app = Flask(__name__) @app.route('/') def index(): return u‘Hello, World!' if __name__ == '__main__': app.run(debug=True)

app.py from flask import Flask app = Flask(__name__) @app.route('/') def index(): return u'Hello, World!‘ @app.route('/<name>') def index_name(name): return u'Hello, ' + name if __name__ == '__main__': app.run(debug=True)

app.py from flask import Flask app = Flask(__name__) @app.route('/') def index(): return u'Hello, World!‘ @app.route('/<name>') @app.route('/<name>/<int:times>') def index_name(name, times=None): if not times: times = 1 return (u'Hello, ' + name + '! ') * times if __name__ == '__main__': app.run(debug=True)

I want to create HTML page!

templates/index.html <!doctype html> <html> <head> <meta charset="utf-8" /> <title>TestPage</title> </head> <body> <h1>{{ content }}<h1> </body> </html>

templates/index.html app.py <!doctype html> <html> <head> <meta charset="utf-8" /> <title>TestPage</title> </head> <body> <h1>{{ content }}<h1> </body> </html> app.py from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): return render_template('index.html', content=u'Hello, World!') @app.route('/<name>') @app.route('/<name>/<int:times>') def index_name(name, times=None): if not times: times = 1 content = (u'Hello, ' + name + '! ') * times return render_template('index.html', content=content) if __name__ == '__main__': app.run(debug=True)

Conclusion

Web development is easy to start

Web development is easy to start Flask is useful tool

Web development is easy to start Flask is useful tool Python is also good tool

Web development is easy to start Flask is useful tool Python is also good tool Don’t be afraid of web

Most important thing is

Most important thing is Your idea.

Reference http://python.org http://flask.pocoo.org http://werkzeug.pocoo.org http://wsgi.readthedocs.org

The End 고기가 먹고 싶어요