PythonForWeb

From Hackerspace Brussels
Jump to: navigation, search


PythonForWeb
Tue 10 Jul 2012 19:30
till Tue 10 Jul 2012 23:00
Norbertgothisbrainmachine2.png
What:
Python for Web applications workshop
Tagline:
This workshop targets beginner users ( no Python or OOP knowledge required ). At the end of the workshop,

participants should be able to create a small website with an SQL database as storage.

Where:
HSB Brussels,Belgium
Cost:
0
Who:
U go,
URL:


Duration: Two evenings during the week. Lesson One already happened.

Lesson 2 planned on July 10

Location: HackerSpace Brussels - Prinses Elisabethlaan 48 av. Princesse Elisabeth, 1030 Schaarbeek

Contents

[edit] What do I need

Here's what you'll need for lesson 1:

  • computer
  • recent Python installed

I will use branch 2 for the demo. There should be no problem using version 3 for the first lesson, but some frameworks and tools for Lesson 2 might not be compatible. Everything should work on major platforms (Linux, *BSD, OS X, Windows), and most stuff should work on exotic platforms (iOS, Android, Symbian S60).

[edit] Main topics

[edit] Lesson 1: Getting hands on

  • Python syntax and Object Oriented Programming (OOP)
  • Going roots: HTTP server using sockets
  • Intro to CGI
  • Using Python CGI
  • Basic storage and persistent data

[edit] Lesson 2: Using libs

  • Templating ( Jinja2 ? )
  • SQL Alchemy ( ORM )
  • CherryPy ( web framework )
  • Deployment options

[edit] Links & Docs

Simple Python CGI Server

[edit] What about Django, Flask, Web.py ?

Django has awesome features, but it uses several new concepts altogether ( MVC, ORM, regex routing, ...). This workshop will help understanding some of these concepts, one at a time. This will help participants to attend a workshop about Django.

I love the simplicity and the object orientation of CherryPy, which is why I arbitrary chose it over other options such as Flash, web.py, ...

[edit] From First Episode

If you didn't attend episode one :

- Basics of Python programming will be required for episode 2.

- Main subjects were HTTP, sockets and CGI. Knowledge of these is not required for episode 2.

- Slides are available here : https://docs.google.com/presentation/d/176zR8x5oJ3JXLrHdWgGMmwYGuqm7NL-_QiFamBOQ1DY/edit

- My files from episode one are available as attachment to this mail

- To start a Python CGI server : python -m CGIHTTPServer