Type: | Talk |
---|---|
Presenter: | Issac Kelly issac@kellycreativetech.com |
Python level: | beginner |
Issac will go over the basics of HTTP apis, what to look for, basic authorization methods, and how to interface with them in your python scripts. There will not be cake.
I would like to cover the basics of writing python to interface with web based apis. I won't be doing any live coding, but rather gradually increase an example program to implement a client for an api like convore.com or FreshBooks or PayPal. I'm going to focus on REST apis, and explain briefly why they're totally superior.
% indicators are the percent of the talk I plan on devoting to each main topic.
API Formats (10%)
- REST-The architecture of HTTP
- stateless
- Good URLs
- Prior Knowledge
- SOAP-The other one.
- """ This area definitely needs more thought, but I've got 3 projects with SOAP apis due before PyOhio, so I'm sure I'll have enough material for a minute or two. """ 1. Ignore HTTP 2. ... 3. Profit
REST Conventions (25%)
- Authorization
- HTTP Authentication
- OAuth
- One URL per resource
- Trust your verbs
- Trust your HTTP Codes
- Data Formats
- Headers
Consuming with Python (50%)
- Libraries
- stdlib - urllib and urllib2
- requests
- Authorization
- HTTP Authorization
- OAuth
- Getting Information Out
- Mapping to Python
- Putting Information Back In
- Breaking REST and into the Unknown (15%)
- Long Polling
- Websocket
- Stateful URLs
Issac Kelly is the lead developer and a partner at Kelly Creative Tech in Columbus. He writes Python for the web almost exclusively. He's written REST APIs projects like http://www.kellycreativetech.com/re/, http://shotblox.com, http://chariotapp.com, and http://arraslife.com, and an HTTP enabled light switch. He's also written API clients for FreshBooks, Convore, and dozens more.
I will sign the recording release agreement (text at http://wiki.python.org/moin/PyOhio/RecordingRelease).