Energy Data Repository (EDR) client

class edr.client.EDRInfo(id: str, title: str, description: str, esdl_type: str)

Represents information about an object in the Energy Data Repository (EDR)

id: str

the ID (or path) of the object in the EDR

title: str

the title of the object in the EDR

description: str

the description of the object in the EDR

esdl_type: str

the ESDL type of the object in the EDR

__init__(id: str, title: str, description: str, esdl_type: str) None
class edr.client.EDRClient(host=None, port=None)

Implements an interface to the Energy Data Repository (EDR)

__init__(host=None, port=None)

Constructor of the EDR client. Uses the public EDR URL by default, but allows to specify a different “host” and “port” for using a local EDR instance

Parameters:
  • host – alternative hostname of a EDR instance

  • port – alternative port of a EDR instance

get_objects_list(esdl_type)

Retrieves a list of objects from the EDR of a given type. The input parameter esdl_type can for example be “EnergyAsset”, “Sectors”, “Carriers” or “InfluxDBProfile”. Each element in the returned list is of type EDRInfo and has id, title, description and esdl_type fields. The ESDL type of the elements in the list can be subtypes of the input esdl_type, e.g. you ask for objects of type “EnergyAsset” and get back objects of type “WindTurbine”.

Parameters:

esdl_type – the type of the ESDL class

Returns:

list of objects of the given type

get_object_esdl(edr_path)

Retrieves a specific ESDL object from the EDR

Parameters:

edr_path – the path in the EDR to the specific ESDL object

Returns:

the ESDL object