@@ -0,0 +1,924 @@
+import os%0Aimport urllib.request%0A%0Aclass RESTAPI(object):%0A%0A    %22%22%22A general class that handles the local file access or the%0A    retrival of tha file.%0A%0A    %22%22%22%0A%0A    def _get_data(self, path_template, url_template, entity_id):%0A        file_path = self._file_path(path_template, entity_id)%0A        if not os.path.exists(file_path):%0A            self._retrive_data(url_template, entity_id, file_path)%0A        return(open(file_path).read())%0A%0A    def _retrive_data(self, url_template, entity_id, file_path):%0A        data = urllib.request.urlopen(%0A            self._base_url + url_template %25 (entity_id)).read()%0A        data_fh = open(file_path, %22wb%22)%0A        data_fh.write(data)%0A        data_fh.close()%0A%0A    def _file_path(self, path_template, entity_id):%0A        return(path_template %25 (self._download_folder, entity_id))%0A%0A    def _rest_url(self, url_template, entity_id):%0A        return(url_template %25 (self._base_url, entity_id))%0A

Add a general REST API class