This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Beginning Python Webservices

Week 1 Notes

Caley Woods's picture
Fri, 2010-09-17 21:49

In college I would've charged $5 for these, consider yourself lucky.

Python Webservices:
Class #1

Instructor: Jeff Hammel
Date: 16-9-2010

This first class took place in #p2pu-webcraft/beginning-python-webservices on irc.freenode.net since we had audio issues (static, etc) on skype.

Class started about 11:45p EDT/10:45p CDT/8:45p PDT/3:45a GMT.

Hobs was nice enough to point out the unabridged chat can be found here http://fasdf.net/channel.log

So skip past us shooting the breeze, some mentions of World of Warcraft, and some other geek stuff and we move onto the topic of webservices. I have distilled the chat into some points for everyone, please continue reading.

  • Beginning python webservices will focus on learning three primary things
    • http
    • python
    • mashing them together to make webservices
  • A webservice listens to HTTP requests and gives back a response
    • Can also do a number of other things that will be covered later
  • Webservices that are consumable are more interesting
    • Consumable means they can be used  by multiple parties (humans and computers)
  • Google’s GeoLocation webservice was looked at
  • Webservices are very good at solving problems that have a very finite scope
  • HTTP has “verbs” we discussed two of them:
    • GET is used to request data
      • When you type www.google.com into your browser, it performs a GET request
    • POST is used to update data
      • If you’ve ever filled out a form on a webpage and clicked submit, the submit button makes the form POST its data to the server
  • It’s best to compartmentalize your services
    • This means don’t make 10 webservices for your site and lump all the code into one spot, make “modules” they are far easier to debug and maintain
  • There will some homework involved in the class
  • Beginning Python Webservices will flip to more empirical (learn by doing) after the third class
  • Next class will cover HTTP and the class after that will focus on Python, especially as it relates to the web
  • Some of us decided to pronounce Webob as we-bob instead of the proper Web-Oh Bee just for kicks

 If anyone has additions, just post updates. Happy coding!