Package pysmug :: Module smugtool :: Class SmugTool
[hide private]
[frames] | no frames]

Class SmugTool

source code

      object --+        
               |        
smugmug.SmugBase --+    
                   |    
     smugmug.SmugMug --+
                       |
                      SmugTool

Instance Methods [hide private]
 
categories_getTree(self)
Return the tree of categories and sub-categories.
source code
 
albums_details(*args, **kwargs)
Returns the full details of an album including EXIF data for all images.
source code
 
unused_albums(self)
Returns a generator of albums with ImageCount == 0.
source code
 
unused_categories(self)
Returns a generator of categories or subcategories with no albums.
source code

Inherited from smugmug.SmugMug: login_anonymously, login_withHash, login_withPassword

Inherited from smugmug.SmugMug (private): _login, _perform

Inherited from smugmug.SmugBase: __getattr__, __init__, batch, images_upload

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]

Inherited from smugmug.SmugBase: progress, proxy, secure, sessionId, verbose, version

Properties [hide private]

Inherited from smugmug.SmugBase: protocol

Inherited from object: __class__

Method Details [hide private]

categories_getTree(self)

source code 

Return the tree of categories and sub-categories.

The format of the response tree:

 {u'Categories': [{u'Name': u'Other', 'SubCategories': {}, u'id': 0},
                  {u'Name': u'Airplanes', 'SubCategories': {}, u'id': 41},
                  {u'Name': u'Animals', 'SubCategories': {}, u'id': 1},
                  {u'Name': u'Aquariums', 'SubCategories': {}, u'id': 25},
                  {u'Name': u'Architecture', 'SubCategories': {}, u'id': 2},
                  {u'Name': u'Art', 'SubCategories': {}, u'id': 3},
                  {u'Name': u'Arts and Crafts', 'SubCategories': {}, u'id': 43},
                  ...,
                  ],
  u'method': u'pysmug.categories.getTree',
  u'stat': u'ok'}

albums_details(*args, **kwargs)

source code 

Returns the full details of an album including EXIF data for all images. It is the composition of calls to albums_getInfo, images_getInfo and images_getEXIF where the images_* calls are done in batch. The primary purpose for this method is to provide easy access to a full album worth of metadata quickly.

The format of the response tree:

 {'Album': {'Attribute1': 'Value1',
            'AttributeN': 'ValueN',
            'Images': [{'EXIF': {'EXIFAttribute1': 'EXIFValue1',
                                 'EXIFAttributeN': 'EXIFValueN'},
                        'ImageAttribute1': 'ImageValue1',
                        'ImageAttributeN': 'ImageAttributeN'},
                       {'EXIF': {'EXIFAttribute1': 'EXIFValue1',
                                 'EXIFAttributeN': 'EXIFValueN'},
                        'ImageAttribute1': 'ImageValue1',
                        'ImageAttributeN': 'ImageAttributeN'}]},
  'Statistics': {},
  'method': 'pysmug.albums.details',
  'stat': 'ok'}
Parameters:
  • albumId - the id of the album to query
  • albumKey - the key of the album to query
  • exif - returns EXIF metadata about each image
Returns:
a dictionary of the album and image details
Decorators:
  • @pysmug.smugmug_keywords

unused_albums(self)

source code 

Returns a generator of albums with ImageCount == 0.

Returns:
a generator of albums with an image count == 0

unused_categories(self)

source code 

Returns a generator of categories or subcategories with no albums.

Returns:
a generator of [sub]categories with no associated albums