def __init__(self, baseURI, testIfOk=False):
        """Instance a new plugIt instance. Need the base URI of the server"""
        self.baseURI = baseURI
        self.cacheKey = 'plugit-' + hashlib.md5(baseURI).hexdigest()

        if testIfOk:
            # Check if everything is ok
            if not self.ping():
                raise Exception("Server doesn't reply to ping !")
            if not self.checkVersion():
                raise Exception("Not a correct PlugIt API version !")
def __init__ ( self , baseURI , testIfOk = False ) : self . baseURI = baseURI self . cacheKey = 'plugit-' + hashlib . md5 ( baseURI ) . hexdigest ( ) if testIfOk : if not self . ping ( ) : raise Exception ( "Server doesn't reply to ping !" ) if not self . checkVersion ( ) : raise Exception ( "Not a correct PlugIt API version !" )
Instance a new plugIt instance. Need the base URI of the server