WebConf.TW 2013
Web Frameworks of Python
... lots
• Django
• Pyramid
• Flask
• Tornado
• Web2py, Turbogears, bottle.py, ...
ALL AGILE!
Slide 41
Slide 41 text
WebConf.TW 2013
Web Frameworks of Python
... lots
• Django
• Pyramid
• Flask
• Tornado
• Web2py, Turbogears, bottle.py, ...
ALL AGILE!
Ready for RESTful
Slide 42
Slide 42 text
WebConf.TW 2013
As long as you know
PEP 8
or
The Hitchhiker’s Guide to Python!
Slide 43
Slide 43 text
WebConf.TW 2013
As long as you know
PEP 8
or
The Hitchhiker’s Guide to Python!
Good style to follow
Slide 44
Slide 44 text
WebConf.TW 2013
Code Indention
from the very beginning.
Seems that Co"eeScript loves it.
Slide 45
Slide 45 text
WebConf.TW 2013
It’s important
You can make choice
between
several well developed choices.
Not just ONE there.
Slide 46
Slide 46 text
WebConf.TW 2013
How to pick a web framework
from “Just pick a good one.”
to
“I’ve compared EVERYTHING.”
Slide 47
Slide 47 text
WebConf.TW 2013
How to pick a web framework
Goal
Scale
Resources
Slide 48
Slide 48 text
WebConf.TW 2013
How to pick a web framework
Goal: Blog, Wiki, EC Platform
Scale: Personal, Studio,
Company, Enterprise
Resources: Schedule, Support
Slide 49
Slide 49 text
WebConf.TW 2013
How to pick a web framework
Micro: bottle.py
Mini: Flask by Armin Ronacher
by Marcel Hellkamp
Slide 50
Slide 50 text
WebConf.TW 2013
How to pick a web framework
Micro: bottle.py
Mini: Flask
Middle: Django, Pyramid, web2py
by Armin Ronacher
by Marcel Hellkamp
Slide 51
Slide 51 text
WebConf.TW 2013
How to pick a web framework
Micro: bottle.py
Mini: Flask
Middle: Django, Pyramid, web2py
Other: you’ll know what you want.
by Armin Ronacher
by Marcel Hellkamp
Slide 52
Slide 52 text
WebConf.TW 2013
What Makes Pyramid Unique
Single-!le applications
Decorator-based con!g
URL generation
Debug Toolbar
Add-ons
Class-based and function-based views
Asset speci!cations
Extensible templating
Event system
No any “mutable globals”
Transaction management
Slide 53
Slide 53 text
WebConf.TW 2013
What Makes Pyramid Unique
Single-!le applications
Decorator-based con!g
URL generation
Debug Toolbar
Add-ons
Class-based and function-based views
Asset speci!cations
Extensible templating
Event system
No any “mutable globals”
Transaction management
Lots more!
Slide 54
Slide 54 text
WebConf.TW 2013
How to setup environment
virtualenv + pip
Search: “keitheis pip” for my tutorial
Slide 55
Slide 55 text
WebConf.TW 2013
Documentation
by Georg Brandl.
Slide 56
Slide 56 text
WebConf.TW 2013
Slide 57
Slide 57 text
WebConf.TW 2013
Object-Relational Mapping
•SQLAlchemy
unless you’re using Django ORM or web2py DAL
• You might also be interested in:
MongoKit
structured schema and validation layer
Slide 58
Slide 58 text
WebConf.TW 2013
Template
•Mako or Jinja2
unless you’re using Django Template
• You might also be interested in:
Plim
“a Python port of Ruby’s Slim template language
built on top of the Mako Templates”
Slide 59
Slide 59 text
WebConf.TW 2013
Manage Web Assets
“webassets - Asset management for Python”
• with Django
• with Flask
• with Pyramid
• other or no framework
Slide 60
Slide 60 text
WebConf.TW 2013
Do it later
Celery
asynchronous task queue/job queue
based on distributed message passing
Slide 61
Slide 61 text
WebConf.TW 2013
Testing
•Nosetests
(Django-nose?)
• You might also be interested in:
pytest
more powerful, detail, #exible and complex
Slide 62
Slide 62 text
WebConf.TW 2013
Coding tool
•Sublime Text 2
powered by Python
•PyDev
more powerful, detail, #exible and complex
• Lots... Emacs, Vim, ...
Slide 63
Slide 63 text
WebConf.TW 2013
Coding tool
•Sublime Text 2
powered by Python
•PyDev
more powerful, detail, #exible and complex
• Lots... Emacs, Vim, ...
Slide 64
Slide 64 text
WebConf.TW 2013
Deployment
•Fabric + cuisine
Server(s) administration in Python
• You might also be interested in:
Plumbum
di"erent style... # sudo[ls["-l", "-a"]]
by Christian Vest Hansen
and Jeffrey E. Forcier.
by Sebastien Pierre
by Tomer Filiba
WebConf.TW 2013
Process Management
•Supervisor
monitor and control a number of processes on
UNIX-like operating systems.
• You might also be interested in:
Circus.io
process & socket manager.
by Agendaless
by Mozilla
Slide 67
Slide 67 text
WebConf.TW 2013
Powerful Data Computing
If you’re going to have numbers,
you won’t hope to learn one more
language for statistic and analysis.
Slide 68
Slide 68 text
WebConf.TW 2013
Python User Group in Taiwan
Communities:
PyHUG #
Taipei.py #
Slide 69
Slide 69 text
WebConf.TW 2013
Python User Group in Taiwan
Communities:
PyHUG #
Taipei.py #
Yilan, Tainan, Kaohsiung, Kinmen, ... #
Slide 70
Slide 70 text
WebConf.TW 2013
PyCon Taiwan 2013
after PyCon.TW 2012 fantasy
#
tw.pycon.org
Slide 71
Slide 71 text
WebConf.TW 2013
PyCon Taiwan 2013
after PyCon.TW 2012 fantasy
#
Call for Proposals
tw.pycon.org
Slide 72
Slide 72 text
WebConf.TW 2013
PyCon Taiwan 2013
after PyCon.TW 2012 fantasy
#
Call for Proposals
and Sponsorship
tw.pycon.org
Slide 73
Slide 73 text
WebConf.TW 2013
Be agile
but not scrumover#ow
Slide 74
Slide 74 text
WebConf.TW 2013
Choose good
Slide 75
Slide 75 text
WebConf.TW 2013
Some Fun Demo?
% python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
Type "help", "copyright", "credits" or "license" for
more information.
>>> import this