AI Client Class

This is the AntiNex Python Client class

class antinex_client.ai_client.AIClient(user='user-not-set', password='password-not-set', url='http://localhost:8010', email='email-not-set', verbose=True, ca_dir=None, cert_file=None, key_file=None, debug=False)[source]

AntiNex Python AI Client

This can use either environment variables or keyword arguments to create a valid client.

build_response(status=3, error='', data=None)[source]
Parameters:
  • status – status code
  • error – error message
  • data – dictionary to send back
get_auth_header()[source]
get_job_by_id(job_id=None)[source]
Parameters:job_id – MLJob.id in the database
get_prepare_by_id(prepare_id=None)[source]
Parameters:prepare_id – MLJob.id in the database
get_result_by_id(result_id=None)[source]
Parameters:result_id – MLJobResult.id in the database
get_token()[source]
is_logged_in()[source]
login()[source]
retry_login()[source]
run_job(body)[source]
Parameters:body – dictionary to launch job
run_prepare(body)[source]
Parameters:body – dictionary to launch prepare
wait_for_job_to_finish(job_id, sec_to_sleep=5.0, max_retries=100000)[source]
Parameters:
  • job_id – MLJob.id to wait on
  • sec_to_sleep – seconds to sleep during polling
  • max_retries – max retires until stopping
wait_for_prepare_to_finish(prepare_id, sec_to_sleep=5.0, max_retries=100000)[source]
Parameters:
  • prepare_id – MLPrepare.id to wait on
  • sec_to_sleep – seconds to sleep during polling
  • max_retries – max retires until stopping