File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2- uploadDataset = "/api/deviceapi/uploadDataset" ,
3- initDatasetIncrement = "/ds/api/dataset/init/" ,
2+ uploadDataset = "/api/deviceapi/uploadDataset"
3+ initDatasetIncrement = "/ds/api/dataset/init/"
44addDatasetIncrement = "/ds/api/dataset/append/"
55getProjectEndpoint = "/ds/api/project/"
Original file line number Diff line number Diff line change 11import requests as req
2- from edgeml .consts import getProjectEndpoint
2+ from edgeml .consts import getProjectEndpoint , initDatasetIncrement , addDatasetIncrement
33from edgeml .Dataset import Dataset
44import time
55
6+
7+ print (initDatasetIncrement )
8+
69class DatasetReceiver :
710
811 def __init__ (self , backendURL , readKey = None , writeKey = None ):
@@ -72,7 +75,7 @@ def __init__(
7275 self .error = None
7376
7477 res = req .post (
75- url + URLS [ " initDatasetIncrement" ] + apiKey ,
78+ url + initDatasetIncrement + apiKey ,
7679 json = {
7780 "name" : self .name ,
7881 "metaData" : self .metaData ,
@@ -117,7 +120,7 @@ async def upload(self, uploadLabel):
117120 tmp_dataStore = [{"name" : k , "data" : tmp_dataStore [k ]} for k in tmp_dataStore .keys ()]
118121 response = req .post (
119122 self .url
120- + URLS [ " addDatasetIncrement" ]
123+ + addDatasetIncrement
121124 + self .apiKey
122125 + "/"
123126 + self .datasetKey ,
@@ -135,7 +138,7 @@ def onComplete(self):
135138 tmp_dataStore = [{"name" : k , "data" : tmp_dataStore [k ]} for k in tmp_dataStore .keys ()]
136139 response = req .post (
137140 self .url
138- + URLS [ " addDatasetIncrement" ]
141+ + addDatasetIncrement
139142 + self .apiKey
140143 + "/"
141144 + self .datasetKey ,
You can’t perform that action at this time.
0 commit comments