ga-api-client 0.5.0__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ga_api_client-0.5.0/ga_api_client.egg-info → ga_api_client-0.5.2}/PKG-INFO +1 -1
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/ga_api_client.py +5 -5
- {ga_api_client-0.5.0 → ga_api_client-0.5.2/ga_api_client.egg-info}/PKG-INFO +1 -1
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/setup.cfg +1 -1
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/LICENSE +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/README.md +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/__init__.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/average.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/capture.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/field_tree.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/hyper_log_log.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/rate.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/std.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api/tdigest.py +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api_client.egg-info/SOURCES.txt +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api_client.egg-info/dependency_links.txt +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api_client.egg-info/requires.txt +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/ga_api_client.egg-info/top_level.txt +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/pyproject.toml +0 -0
- {ga_api_client-0.5.0 → ga_api_client-0.5.2}/setup.py +0 -0
|
@@ -205,7 +205,7 @@ class Client:
|
|
|
205
205
|
async with self._sem:
|
|
206
206
|
# test_fn is a function to check if the request should be sent
|
|
207
207
|
if test_fn is not None and test_fn() is False:
|
|
208
|
-
return None
|
|
208
|
+
return 0, None
|
|
209
209
|
ts_req = datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S')
|
|
210
210
|
while True:
|
|
211
211
|
try:
|
|
@@ -421,7 +421,6 @@ class Reader:
|
|
|
421
421
|
logging.info(f'/record status={status} start={_logtime(start)} end={_logtime(end)} series={self.series}')
|
|
422
422
|
if rlt is not None and len(rlt) > 0:
|
|
423
423
|
self.count += len(rlt) - 1 # skip first row, which is header
|
|
424
|
-
# print(rlt)
|
|
425
424
|
return pd.DataFrame(rlt[1:], columns=rlt[0])
|
|
426
425
|
return pd.DataFrame() # empty dataframe is returned if no data
|
|
427
426
|
|
|
@@ -452,7 +451,10 @@ class Reader:
|
|
|
452
451
|
df = pd.concat([df, rlt], ignore_index=True, copy=False)
|
|
453
452
|
if len(df) >= self.size:
|
|
454
453
|
break
|
|
455
|
-
|
|
454
|
+
if self.fields is None:
|
|
455
|
+
return df.head(self.size)
|
|
456
|
+
else:
|
|
457
|
+
return df.head(self.size)[self.fields]
|
|
456
458
|
except Exception as e:
|
|
457
459
|
logging.error(f'execute record fail {e}')
|
|
458
460
|
for task in tasks:
|
|
@@ -854,10 +856,8 @@ class Pipeline:
|
|
|
854
856
|
except:
|
|
855
857
|
ts = None
|
|
856
858
|
if ts is None:
|
|
857
|
-
print('range')
|
|
858
859
|
return await self._read_range(dts, *args, **kwargs)
|
|
859
860
|
else:
|
|
860
|
-
print('point')
|
|
861
861
|
return await self._read_point(ts, *args, **kwargs)
|
|
862
862
|
|
|
863
863
|
class Dataset:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|