<jupyter_start><jupyter_text>![nrg](https://www.gravatar.com/avatar/6282094b092c756acc9f7552b164edfe?s=24) NRG Cloud | API example notebookLogin to NRG Cloud and get your `client_id` and `client_secret` from the API Setup page: https://cloud.nrgsystems.com/data-manager/api-setup*This notebook requires that you have access to sites within the NRG Cloud platform.*<jupyter_code>import nrgpy
import pandas as pd
client_id = ''
client_secret = ''

txt_dir = 'exports'<jupyter_output><empty_output><jupyter_text>get list of available sites<jupyter_code>sites = nrgpy.cloud_sites(
    client_id=client_id,
    client_secret=client_secret
)
sites.sites_df<jupyter_output><empty_output><jupyter_text>export data from your site<jupyter_code>site_id = sites.sites_list[0]['siteId']  # first site in your list
exporter = nrgpy.cloud_export(
            client_id=client_id,
            client_secret=client_secret,
            out_dir=txt_dir,
            site_id=site_id,
#             start_date="2021-07-10",
#             end_date="2021-07-11",
        )
exporter.request_duration
reader = nrgpy.sympro_txt_read(exporter.export_filepath, ch_details=True)
nrgpy.check_intervals(reader.data)
reader.ch_info<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1000813669650122, 'fraction_numerical': 0.03254678600488202, 'mean_word_length': 4.885167464114833, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '284632', 'license': 'MIT', 'n_tokens_mistral': 458, 'n_tokens_neox': 429, 'n_words': 75, 'path': 'nrg_cloud__exampleJupyterNotebook.ipynb', 'repo_name': 'kyarazhan/nrgpy', 'size': '1229'}