A question was asked on a dgrin thread about whether the SmugMug API supported building a tag cloud – it doesn’t. A responder suggested it would take far too long to generate one from the API since you’d have to trawl through every photo. This is indeed true, but you don’t have to do it serially. I consider the batchable interface for pysmug to be it’s selling point and building a tag cloud is the perfect demonstration.

I finally found a non-trivial reason to implement a Python decorator. I make extensive use of Python keyword arguments in the pysmug API and map those spellings to SmugMug keyword arguments. The algorithm for converting a Python spelling to a SmugMug spelling is pretty straight forward and easily wrapped up in a function. Originally, the first line of every function required formatting the keywords into SmugMug-style spellings by calling self._prepare_keywords(**kwargs). It occurred to me this…

Recent Posts

About

I'm not here.