def submit(self, password=''):
        """Submits the participation to the web site.

        The passwords is sent as plain text.

        :return: the evaluation results.
        """

        url = '{}/api/submit'.format(BASE_URL)
        try:
            r = requests.post(url,
                              data=self.dumps(),
                              headers={'content-type': 'application/json'},
                              auth=(self['metadata']['email'], password))

            response = r.json()

        except requests.exceptions.HTTPError as e:
            logging.error('Error while submitting the participation. {}'.format(e))
            return Job()

        if 'error' in response:
            logging.error('Error while processing the participation. {}'.format(response['error']))
            return Job()

        return Job(response)
def submit ( self , password = '' ) : url = '{}/api/submit' . format ( BASE_URL ) try : r = requests . post ( url , data = self . dumps ( ) , headers = { 'content-type' : 'application/json' } , auth = ( self [ 'metadata' ] [ 'email' ] , password ) ) response = r . json ( ) except requests . exceptions . HTTPError as e : logging . error ( 'Error while submitting the participation. {}' . format ( e ) ) return Job ( ) if 'error' in response : logging . error ( 'Error while processing the participation. {}' . format ( response [ 'error' ] ) ) return Job ( ) return Job ( response )
Submits the participation to the web site.

        The passwords is sent as plain text.

        :return: the evaluation results.