semvec/pypi-packages huggingface dataset:
apiCom 1.0.2
This is a package to stremaline api method calls
License: MIT
Keywords: api automation,api testing,api commons,python api,api automation using pythoncommon repo

# winter-api-commons


API Testing Commons

This is a package to stremaline api method calls"

This module containes the major reusable functions which can be imported and accessed directly which will reduce the time and code redundancy.

Installation

pip install apiCom




Methods available

get_api(endpoint, header)
post_api(endpoint, request_payload, header)
put_api(endpoint, request_payload, header)
delete_api(endpoint, data, header)
patch_api(endpoint, request_payload, header)
validate_status_code(response, expected_status)
validate_schema(response, expected_schema)
validate_strings(actual_message, expected_message)
value_present(response, expected_value)
is_json(response)
Sample code


import commonsApi
url = "https://api.car.com/teslar/model1"
header = {}
resp = apiCom.get_api(url, header)
print(resp.json())