GalleryRemote is a class implements the Gallery Remote protocol as documented here: http://codex.gallery2.org/Gallery_Remote:Protocol
The Gallery project is an open source web based photo album organizer written in php. Gallery's web site is: http://gallery.menalto.com/
This class is a 3rd party product which is not maintained by the creators of the Gallery project.
from galleryremote import Gallery
my_gallery = Gallery('http://www.yoursite.com/gallery2', 2)
albums = my_gallery.fetch_albums()