Package arvados :: Module api
[hide private]
[frames] | no frames]

Module api

source code

Classes [hide private]
  OrderedJsonModel
Model class for JSON that preserves the contents' order.
Functions [hide private]
 
_intercept_http_request(self, uri, method="GET", headers={}, **kwargs) source code
 
_patch_http_request(http, api_token) source code
 
_cast_objects_too(value, schema_type) source code
 
_new_http_error(cls, *args, **kwargs) source code
 
http_cache(data_type) source code
 
api(version=None, cache=True, host=None, token=None, insecure=False, request_id=None, **kwargs)
Return an apiclient Resources object for an Arvados instance.
source code
 
api_from_config(version=None, apiconfig=None, **kwargs)
Return an apiclient Resources object enabling access to an Arvados server instance.
source code
Variables [hide private]
  _logger = logging.getLogger('arvados.api')
  MAX_IDLE_CONNECTION_DURATION = 30
  RETRY_DELAY_INITIAL = 2
  RETRY_DELAY_BACKOFF = 2
  RETRY_COUNT = 2
  _cast_orig = apiclient_discovery._cast
Function Details [hide private]

api(version=None, cache=True, host=None, token=None, insecure=False, request_id=None, **kwargs)

source code 
Return an apiclient Resources object for an Arvados instance.

:version:
  A string naming the version of the Arvados API to use (for
  example, 'v1').

:cache:
  Use a cache (~/.cache/arvados/discovery) for the discovery
  document.

:host:
  The Arvados API server host (and optional :port) to connect to.

:token:
  The authentication token to send with each API call.

:insecure:
  If True, ignore SSL certificate validation errors.

:request_id:
  Default X-Request-Id header value for outgoing requests that
  don't already provide one. If None or omitted, generate a random
  ID. When retrying failed requests, the same ID is used on all
  attempts.

Additional keyword arguments will be passed directly to
`apiclient_discovery.build` if a new Resource object is created.
If the `discoveryServiceUrl` or `http` keyword arguments are
missing, this function will set default values for them, based on
the current Arvados configuration settings.

api_from_config(version=None, apiconfig=None, **kwargs)

source code 
Return an apiclient Resources object enabling access to an Arvados server
instance.

:version:
  A string naming the version of the Arvados REST API to use (for
  example, 'v1').

:apiconfig:
  If provided, this should be a dict-like object (must support the get()
  method) with entries for ARVADOS_API_HOST, ARVADOS_API_TOKEN, and
  optionally ARVADOS_API_HOST_INSECURE.  If not provided, use
  arvados.config (which gets these parameters from the environment by
  default.)

Other keyword arguments such as `cache` will be passed along `api()`