-
Notifications
You must be signed in to change notification settings - Fork 145
data api client design
Discussion of the data-api client requirements and implementation
The data-api client, climada.util.api_client.Client is meant for
- providing a generic python interface to the public CLIMADA data api
- creating
climadaPython objects, such asExposures,HazardorImpactFunc, from dataset files of the CLIMADA data api in a comfortable, easy to use way.
The implemented methods are supposed to be as natural as possible and hiding away boilerplate code that downloads files, reads and converts content into CLIMADA objects. Additionally they should take care of caching files on the local filesystem in order to save resources of the api server.
returns: a list of DataTypeEssentials objects
arguments:
- data type group (
exposures,hazard,impact_func)
purpose: show what kind of datasets are available from climada.ethz.ch
considerations: used to be get_datatypes
returns: a DataTypeInfo object
arguments:
- data type name
purpose: give additional information about a particular data type, its description and the properties (mandatory and optional) of datasets from this type.
considerations: why another method and not just including the additional information in list_data_type_infos:
(depending on the implementation and the number of datasets) collecting properties can be time consuming and providing unwanted information may be annoying, especially when it takes a long time to get the answer.
returns:
arguments:
purpose:
considerations:
returns:
arguments:
purpose:
considerations:
returns:
arguments:
purpose:
considerations:
returns:
arguments:
purpose:
considerations: