Hive.tools
dict_by_request(responce_list, univocal_keys)
Given a responce list it turn the List[Dict] into a Dict[Dict] where the keys are the univocal_keys given in the arguments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
responce_list |
list[dict]
|
API responce |
required |
univocal_keys |
list[str]
|
list of keys to use to identify the univocal arguments to be turned into the new dict keys |
required |
Returns: dict
Source code in hive/tools.py
order_by_request(params_list, responce_list, univocal_keys)
Given a API responce, its univocal keys and the params list used to get that responce, a new Args: params_list: params given to the API responce_list: API responce univocal_keys: keys that represents the univocal field of the responce
Returns: List