예제 #1
0
 def createAutenthicationToken(self):
     loginData = {'username': self.username, 'password': self.password}
     postRestObj = PostRest(function='login/',
                            dataDict=loginData,
                            includeHeaders=False)
     jsonResult = postRestObj.performRequest()
     loginSjonObj = LoginJson(jsonValue=jsonResult)
     if loginSjonObj.lodingData != None:
         os.environ["token_api"] = loginSjonObj.jsonData['token']
         return loginSjonObj.jsonData['token']
     return None
예제 #2
0
    def setDomainSOurceInformation(self, jsonData):
        """
        set new domain source information in the database

        :return: json file with the last domain source information created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function = self.function, dataDict = jsonData).performRequest()
        return result_post
예제 #3
0
    def set_wholeDNA(self, jsonData):
        """
        set new wholeDNA in the database

        :return: json file with the last wholeDNA created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function = self.function, dataDict = jsonData).performRequest()
        return result_post
예제 #4
0
    def setPPICogScore(self, jsonData):
        """
        set new PPI cogs score in the database

        :return: json file with the last genus created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function = self.function, dataDict = jsonData).performRequest()
        return result_post
예제 #5
0
    def set_bacteriophage(self, jsonData):
        """
        set new bacteriophage in the database

        :return: json file with the last bacteriophage created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function=self.function,
                               dataDict=jsonData).performRequest()
        return result_post
예제 #6
0
    def setProteinPFAM(self, jsonData):
        """
        set new proteinPFAM in the database

        :return: json file with the last proteinpfam created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function=self.function,
                               dataDict=jsonData).performRequest()
        return result_post
    def setCogInterSource(self, jsonData):
        """
        set new cog interaction source in the database

        :return: json file with the last couple created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function=self.function,
                               dataDict=jsonData).performRequest()
        return result_post
예제 #8
0
    def set_person_responsible(self, jsonData):
        """
        set new person responsible in the database

        :return: json file with the last person responsible created
        :rtype: string (json format)
        """
        jsonData = json.dumps(jsonData)
        result_post = PostRest(function=self.function,
                               dataDict=jsonData).performRequest()
        return result_post