nrgpy.cloud_api.sites module#

class nrgpy.cloud_api.sites.CloudSites(client_id: str, client_secret: str, url_base: str = 'https://cloud-api.nrgsystems.com/nrgcloudcustomerapi/')[source]#

Bases: CloudApi

Find NRG Cloud sites associated with a user.

Examples

>>> import nrgpy
>>> client_id = 'go to https://cloud.nrgsystems.com for access'
>>> client_secret = 'go to https://cloud.nrgsystems.com for access'
>>> sites = nrgpy.CloudSites(client_id=client_id, client_secret=client_secret)
>>> sites.sites_df
siteId  siteNumber    siteDescription               project  loggerSerialNumber
0      33        6716           SunnyDog              SunnyDog           820606716
1     213        1234    Suntastic South             Suntastic           820601234
>>> sites.get_siteid(site_number=6716)
33
Attributes:
client_idstr

available in the NRG Cloud portal

client_secretstr

available in the NRG Cloud portal

sites_listlist of dict
sites_dfpandas dataframe
get_siteid(site_number: str = '', logger_sn: str = '') None[source]#

Get NRG Cloud site ID that corresponds to site number and/or logger SN

Parameters:
site_numberint

site number

logger_snint

serial number of logger (beginning with 8206)

Returns:
int

corresponding site ID

get_sites() None[source]#

Retrieve list of sites user has access to.

nrgpy.cloud_api.sites.cloud_sites#

alias of CloudSites