original_docstring: Return a client object, configured from flags.
docstring: Return a client object, configured from flags.
docstring_tokens: Return a client object configured from flags .
code: def GetClientFromFlags():
    """Return a client object, configured from flags."""
    log_request = FLAGS.log_request or FLAGS.log_request_response
    log_response = FLAGS.log_response or FLAGS.log_request_response
    api_endpoint = apitools_base.NormalizeApiEndpoint(FLAGS.api_endpoint)
    additional_http_headers = dict(x.split('=', 1) for x in FLAGS.add_header)
    credentials_args = {
        'service_account_json_keyfile': os.path.expanduser(FLAGS.service_account_json_keyfile)
    }
    try:
      client = client_lib.BigqueryV2(
          api_endpoint, log_request=log_request,
          log_response=log_response,
          credentials_args=credentials_args,
          additional_http_headers=additional_http_headers)
    except apitools_base.CredentialsError as e:
      print 'Error creating credentials: %s' % e
      sys.exit(1)
    return client
code_tokens: def GetClientFromFlags ( ) : log_request = FLAGS . log_request or FLAGS . log_request_response log_response = FLAGS . log_response or FLAGS . log_request_response api_endpoint = apitools_base . NormalizeApiEndpoint ( FLAGS . api_endpoint ) additional_http_headers = dict ( x . split ( '=' , 1 ) for x in FLAGS . add_header ) credentials_args = { 'service_account_json_keyfile' : os . path . expanduser ( FLAGS . service_account_json_keyfile ) } try : client = client_lib . BigqueryV2 ( api_endpoint , log_request = log_request , log_response = log_response , credentials_args = credentials_args , additional_http_headers = additional_http_headers ) except apitools_base . CredentialsError as e : print 'Error creating credentials: %s' % e sys . exit ( 1 ) return client
short_docstring: Return a client object, configured from flags.
short_docstring_tokens: Return a client object configured from flags .
comment: """Return a client object, configured from flags."""