News for hackers. Stuff that matters.
Re:Python Wrapper for Yipit API - my first big open source p... by alexatkeplar on Sunday October 09, 2011 @06:33AM (#3090193)
Nice! I'm writing a Python API client at the moment - a couple of suggestions:

1. It's worth taking a look at DictShield https://github.com/j2labs/dictshield or Colander (https://pylonsproject.org/projects/colander/dev/) as a way to formalise your API definition and minimize the amount of boilerplate you have to write. I'd recommend DictShield - the author j2labs is very active on HN and is a really approachable guy.

2. Related to 1 - the Requests library (http://pypi.python.org/pypi/requests) is higher level than urllib* - again using this should help you to reduce boilerplate...

Happy coding!

Re:Python Wrapper for Yipit API - my first big open source p... by wesleyzhao on Sunday October 09, 2011 @06:42AM (#3090218)
1. Just followed on github :) looking forward to using in the future.

2. Nice! Did not realize it could be that easy. Though I do wonder, does it hurt code efficiency at all? Not that it matters much to me at this point.

Re:Python Wrapper for Yipit API - my first big open source p... by alexatkeplar on Sunday October 09, 2011 @02:19PM (#3090941)
2. I don't think it impacts on performance - because it's basically just a user-friendly wrapper around urllib2