#!/usr/bin/env python
#
# Tutorial:
#    Show how to establish a connection to Launchpad services. This must
#    be done in every script which tries to obtain information from
#    Launchpad.
#

from lpltk.service                   import LaunchpadService

# LpltkTutorial
#
class LpltkTutorial():
    # main
    #
    def main(self):
        # By instantiating a LaunchpadService object, a connection is
        # made with Launchpad, credentials are exchanged, the sign-on
        # processes is executed and credentials are cached. Once this
        # succeeds, further communication with Launchpad can happen.
        #
        lp = LaunchpadService()
        print("We've successfully established a connection to Launchpad services.")

if __name__ == '__main__':
    app = LpltkTutorial()
    app.main()

# vi:set ts=4 sw=4 expandtab:

