deepint.util

class deepint.util.CustomEndpointCall(organization_id: str, credentials: Credentials)

Allows to create custom endpoints to communciate with Deep Intelligence.

organization_id

Deep Intelligence organization.

credentials

credentials to auth with.

call(http_operation: str, path: str, headers: Dict[str, Any], parameters: Dict[str, Any], is_paginated: bool = False) Dict[str, Any]

Performs a call on a custon Deep Ingelligence endpoint. It performs the authentication and organziation set previously.

Parameters:
  • http_operation – the HTTP method to run, such as GET, POST, PUT and DELETE.

  • path – the URL path to run

  • headers – the headers except the organization and authentication information.

  • parameters – the parameters to send in the URL or body of the request. It will be formated to suite the Deep Intelligence restrictions.

  • is_paginated – set to True if you want to handle a paginated request. In that case a generator will be returned to iterate through all results.

Returns:

The response of Deep Intelligence API