Announcement: pysmug, a high-performance SmugMug client for Python

bziclixbziclix Registered Users Posts: 20 Big grins
Hi,

I'd like to announce my new python client for the SmugMug API, pysmug. It's built on top of PycURL and is extremely fast, especially if you use the batching operation mode which allows many requests to be executed in parallel within a single thread. It supports the entire SmugMug 1.2.1 API (though I don't have a Pro account to test those features) including support for https. I have included many examples to demonstrate how to use the library.

It's available here: http://code.google.com/p/pysmug/.

Feel free to post comments to the google code page, here or email me directly.

thanks, brian
Brian Zimmer / bzimmer.ziclix.com

Comments

  • GarethLewinGarethLewin Registered Users Posts: 95 Big grins
    edited January 23, 2008
    bziclix wrote:
    Hi,

    I'd like to announce my new python client for the SmugMug API, pysmug. It's built on top of PycURL and is extremely fast, especially if you use the batching operation mode which allows many requests to be executed in parallel within a single thread. It supports the entire SmugMug 1.2.1 API (though I don't have a Pro account to test those features) including support for https. I have included many examples to demonstrate how to use the library.

    It's available here: http://code.google.com/p/pysmug/.

    Feel free to post comments to the google code page, here or email me directly.

    thanks, brian

    Cool beans.

    You know they give free pro accounts to anyone that is doing dev stuff right?

    http://blogs.smugmug.com/don/2007/04/20/lifetime-free-pro-accounts-to-developers/
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 23, 2008
    bziclix wrote:
    though I don't have a Pro account to test those features

    Brian,

    What your SM account name ?

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • bziclixbziclix Registered Users Posts: 20 Big grins
    edited May 14, 2008
    pysmug v0.4 released
    I just released version 0.4 of pysmug which adds support for the 1.2.2 API as well as many other cool new features. It remains very fast, especially for batch operations. There's more information available here. You can download it from the project home page.

    thanks, brian
    bziclix wrote:
    Hi,

    I'd like to announce my new python client for the SmugMug API, pysmug. It's built on top of PycURL and is extremely fast, especially if you use the batching operation mode which allows many requests to be executed in parallel within a single thread. It supports the entire SmugMug 1.2.1 API (though I don't have a Pro account to test those features) including support for https. I have included many examples to demonstrate how to use the library.

    It's available here: http://code.google.com/p/pysmug/.

    Feel free to post comments to the google code page, here or email me directly.

    thanks, brian
    Brian Zimmer / bzimmer.ziclix.com
  • bziclixbziclix Registered Users Posts: 20 Big grins
    edited October 15, 2008
    pysmug v0.5 released
    I'm happy to announce version 0.5 of pysmug is now available with a complete write-up here.

    This version introduces smugfind:
    $ smugfind -f Title -p "Public and not SquareThumbs" | sort
    [('Title', u"Chinese New Year's Parade 2008")]
    [('Title', u'Avalanche Awareness')]
    [('Title', u'Battle of Port Gamble')]
    [('Title', u'Beautiful Day Ride')]
    

    a command-line utility which uses Python as a simple and powerful expression evaluator. Now if you want to find all the public albums without square thumbnails it's possible.

    thanks, brian
    Brian Zimmer / bzimmer.ziclix.com
  • wmfox3wmfox3 Registered Users Posts: 6 Beginner grinner
    edited January 5, 2011
    Patch to pysmug fixes Nov. 2010 api change
    For anyone having pysmug trouble since the Nov. 2010 api changes, the following patch fixed the issue for me:

    pysmug's implementation of pycurl does not set a cookie jar. To fix the problem, add the following two lines to smugmug.py at line number #143 and reinstall:


    c.setopt(c.COOKIEFILE, 'cookies.txt')
    c.setopt(c.COOKIEJAR, 'cookies.txt')


    You may want to set an absolute path to cookies.txt to make sure it's getting written to a folder with the necessary permissions, i.e. /tmp/
  • bziclixbziclix Registered Users Posts: 20 Big grins
    edited January 5, 2011
    wmfox3 wrote: »
    For anyone having pysmug trouble since the Nov. 2010 api changes, the following patch fixed the issue for me:

    pysmug's implementation of pycurl does not set a cookie jar. To fix the problem, add the following two lines to smugmug.py at line number #143 and reinstall:


    c.setopt(c.COOKIEFILE, 'cookies.txt')
    c.setopt(c.COOKIEJAR, 'cookies.txt')


    You may want to set an absolute path to cookies.txt to make sure it's getting written to a folder with the necessary permissions, i.e. /tmp/

    I haven't been using pysmug as frequently (I've been using the built-in uploader in Lr3) but I'll definitely make some patches for the api changes. Did anything else break?

    Thanks for using pysmug!

    thanks, brian
    Brian Zimmer / bzimmer.ziclix.com
Sign In or Register to comment.