iudx.common package

Submodules

iudx.common.HTTPEntity module

Module doc string. Leave empty for now.

HTTPEntity.py

class iudx.common.HTTPEntity.HTTPEntity(cert: Optional[Dict] = None)[source]

Bases: requests.models.Request

Abstract class for Requests. Helps to create a modular interface for the API Request in Python.

delete(url: str, headers: Dict)iudx.common.HTTPResponse.HTTPResponse[source]

Method to create a ‘DELETE’ API request and returns response.

Parameters
  • url (String) – Base URL for the API Request.

  • headers (Dict) – Headers passed with the API Request.

Returns

HTTP Response after the API Request.

Return type

response (HTTPResponse)

get(url: str, headers: Dict)iudx.common.HTTPResponse.HTTPResponse[source]

Method to create a ‘GET’ API request and returns response.

Parameters
  • url (String) – Base URL for the API Request.

  • headers (Dict) – Headers passed with the API Request.

Returns

HTTP Response after the API Request.

Return type

response (HTTPResponse)

post(url: str, body: str, headers: Dict)iudx.common.HTTPResponse.HTTPResponse[source]

Method to create a ‘POST’ API request and returns response.

Parameters
  • url (String) – Base URL for the API Request.

  • body (Dict) – Data for the body passed with the API Request.

  • headers (Dict) – Headers passed with the API Request.

Returns

HTTP Response after the API Request.

Return type

response (HTTPResponse)

update(url: str, body: str, headers: Dict)iudx.common.HTTPResponse.HTTPResponse[source]

Method to create a ‘PUT’ API request and returns response.

Parameters
  • url (String) – Base URL for the API Request.

  • body (Dict) – Data for the body passed with the API Request.

  • headers (Dict) – Headers passed with the API Request.

Returns

HTTP Response after the API Request.

Return type

response (HTTPResponse)

iudx.common.HTTPResponse module

Module doc string. Leave empty for now.

HTTPEntity.py

class iudx.common.HTTPResponse.HTTPResponse[source]

Bases: object

Abstract class for Response. Helps to create a modular interface for the API Response in Python.

get_json()Dict[source]

Method to return the json object for the response body.

Returns

Returns json data.

Return type

result_json (Dict)

get_status_code()int[source]

Method to return the status code for the response.

Returns

Returns numerical status code for the Response.

Return type

status (Integer)

Module contents