Python CheddarGetter client: cheddarsnake

Hans's Avatar

Hans

01 Feb, 2010 08:31 AM

Hello,

I've written a CheddarGetter library for Python called cheddarsnake. You can check it out here:

http://gainstudio.com/blog/cheddarsnake/

If you're trying to integrate CheddarGetter with your Python app, I hope this can help. Let me know what you think!

Hans

  1. Support Staff 1 Posted by Marc Guyer on 01 Feb, 2010 03:41 PM

    Marc Guyer's Avatar

    Wow -- Great news! We'll definitely blog about that.

    I just perused the code and found the Plan::is_free() method to be counter to what CG considers a free plan. A plan is considered free if there isn't a recurring charge, a setup charge or the possibility of tracked item overage.

    Honestly, I thought there was an 'isFree' node in the xml for plans but I just determined that there isn't. I'd be happy to add that in for you. It should be there anyway.

  2. 2 Posted by Hans on 01 Feb, 2010 06:37 PM

    Hans's Avatar

    Thanks Marc,

    I just modified Plan.is_free() to check if there's the possibility of tracked item overage. Let me know when the isFree node appears in the xml, and I'll make the change to use that instead.

  3. Support Staff 3 Posted by Marc Guyer on 01 Feb, 2010 06:56 PM

    Marc Guyer's Avatar

    It's there now.

  4. 4 Posted by Dan Kamins on 05 Feb, 2010 08:35 AM

    Dan Kamins's Avatar

    Hans,

    First of all, thanks a lot for writing this library!

    I did however want to raise the issue for anybody using this library that because it uses urllib2 for HTTP Basic Auth, it's actually making two HTTP requests for each CG API call. So this does introduce a bit of unnecessary latency into the interactions.

    There is a workaround for this which is to manually specify the 'Authorization' header yourself (building the base64 digest), in which case it passes auth with the first request rather than waiting for the 401 Not Authorized and then trying again.

    A little more about this "bug" in urllib2 can be found here:
    http://bugs.python.org/issue7159

  5. 5 Posted by Preston Holmes on 05 Feb, 2010 06:03 PM

    Preston Holmes's Avatar

    So interesting the convergence, Feedmagnet guys just released their pycheddar library:

    http://www.feedmagnet.com/blog/cheddargetter-for-python-and-django/

    -Preston

  6. 6 Posted by Dan Kamins on 05 Feb, 2010 09:52 PM

    Dan Kamins's Avatar

    Both libs look good. I ended up going with Hans's http://gainstudio.com/blog/cheddarsnake/ because the feedmagnet one wasn't compatible with Google App Engine's Python environment, which was a requirement for me.

  7. Marc Guyer closed this discussion on 18 May, 2010 01:36 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM