My sister is an avid Etsy seller and asked me to write for her some software that would let her take hundreds of items from an Excel spreadsheet and post them to Etsy. I’ve written this software (actually, it’s a hosted web service, powered by Django) and it’s in a sort of private beta right now, but that’s another (future) blog post…
While developing the software, I stumbled upon etsy-python, from Dan McKinley of Etsy, which is a Python module for accessing the Etsy API. Unfortunately, it only supported the V1 API, which was deprecated on November 1, 2010.
So I forked the github repo and got to work adding the support for the V2 API. It wasn’t too hard, because the Etsy API is very consistent and is self-documented (you can call the API to retrieve a method table that gives you the list of methods and their parameters; this allows one to dynamically generate method stubs from a small amount of code). The hardest part was dealing with OAuth (using Joe Stump’s oauth2 module), but OAuth always seems to be a little bit of a pain in the butt, because of its inherent complexity.
Here’s the pull request, which was accepted on January 27, 2011.
etsy-python is on pypi, so you can use easy_install
, pip
, etc. to install it (Unfortunately, Dan made a mistake in the README file so the pypi page says that the V2 support came from Ben Dayan, but it’s actually from me).
Thanks for V2 api update. I was wondering if you had a tutorial of sorts for your OAuth or can you post your script to create an OAuth session.
Hey Marc,
Could you email me a quick overview of how to go about authorizing a user using your v2 support? I’ve been looking around / trying for weeks and have no been able to successfully use etsy-python for much of anything! (I swear I’m not incompetent!)
I’d appreciate the help a ton!