hsclient 1.0.2__tar.gz → 1.0.4__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.
- {hsclient-1.0.2 → hsclient-1.0.4}/PKG-INFO +2 -2
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient/hydroshare.py +5 -3
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient.egg-info/PKG-INFO +2 -2
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient.egg-info/requires.txt +1 -1
- {hsclient-1.0.2 → hsclient-1.0.4}/setup.py +2 -2
- {hsclient-1.0.2 → hsclient-1.0.4}/LICENSE.txt +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/README.md +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient/__init__.py +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient/json_models.py +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient/oauth2_model.py +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient/utils.py +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient.egg-info/SOURCES.txt +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient.egg-info/dependency_links.txt +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/hsclient.egg-info/top_level.txt +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/setup.cfg +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/tests/test_data_objects.py +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/tests/test_functional.py +0 -0
- {hsclient-1.0.2 → hsclient-1.0.4}/tests/test_json_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hsclient
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: A python client for managing HydroShare resources
|
|
5
5
|
Home-page: https://github.com/hydroshare/hsclient
|
|
6
6
|
Author: Scott Black
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Requires-Python: >=3.9
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
|
-
Requires-Dist: hsmodels>=1.0.
|
|
17
|
+
Requires-Dist: hsmodels>=1.0.4
|
|
18
18
|
Requires-Dist: requests
|
|
19
19
|
Requires-Dist: requests_oauthlib
|
|
20
20
|
Provides-Extra: pandas
|
|
@@ -53,6 +53,8 @@ from hsclient.json_models import ResourcePreview, User
|
|
|
53
53
|
from hsclient.oauth2_model import Token
|
|
54
54
|
from hsclient.utils import attribute_filter, encode_resource_url, is_aggregation, main_file_type
|
|
55
55
|
|
|
56
|
+
CHECK_TASK_PING_INTERVAL = 10
|
|
57
|
+
|
|
56
58
|
|
|
57
59
|
class File(str):
|
|
58
60
|
"""
|
|
@@ -1274,7 +1276,7 @@ class Resource(Aggregation):
|
|
|
1274
1276
|
status = json_response['status']
|
|
1275
1277
|
if status in ("Not ready", "progress"):
|
|
1276
1278
|
while aggregation._hs_session.check_task(task_id) != 'true':
|
|
1277
|
-
time.sleep(
|
|
1279
|
+
time.sleep(CHECK_TASK_PING_INTERVAL)
|
|
1278
1280
|
aggregation.refresh()
|
|
1279
1281
|
|
|
1280
1282
|
@refresh
|
|
@@ -1368,7 +1370,7 @@ class HydroShareSession:
|
|
|
1368
1370
|
file = self.get(path, status_code=200, allow_redirects=True)
|
|
1369
1371
|
|
|
1370
1372
|
if file.headers['Content-Type'] != "application/zip":
|
|
1371
|
-
time.sleep(
|
|
1373
|
+
time.sleep(CHECK_TASK_PING_INTERVAL)
|
|
1372
1374
|
return self.retrieve_bag(path, save_path)
|
|
1373
1375
|
return self.retrieve_file(path, save_path)
|
|
1374
1376
|
|
|
@@ -1386,7 +1388,7 @@ class HydroShareSession:
|
|
|
1386
1388
|
zip_status = json_response['zip_status']
|
|
1387
1389
|
if zip_status == "Not ready":
|
|
1388
1390
|
while self.check_task(task_id) != 'true':
|
|
1389
|
-
time.sleep(
|
|
1391
|
+
time.sleep(CHECK_TASK_PING_INTERVAL)
|
|
1390
1392
|
return self.retrieve_file(download_path, save_path)
|
|
1391
1393
|
|
|
1392
1394
|
def upload_file(self, path, files, status_code=204):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hsclient
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: A python client for managing HydroShare resources
|
|
5
5
|
Home-page: https://github.com/hydroshare/hsclient
|
|
6
6
|
Author: Scott Black
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Requires-Python: >=3.9
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
|
-
Requires-Dist: hsmodels>=1.0.
|
|
17
|
+
Requires-Dist: hsmodels>=1.0.4
|
|
18
18
|
Requires-Dist: requests
|
|
19
19
|
Requires-Dist: requests_oauthlib
|
|
20
20
|
Provides-Extra: pandas
|
|
@@ -5,11 +5,11 @@ README = (pathlib.Path(__file__).parent / "README.md").read_text()
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name='hsclient',
|
|
8
|
-
version='1.0.
|
|
8
|
+
version='1.0.4',
|
|
9
9
|
packages=find_packages(include=['hsclient', 'hsclient.*'],
|
|
10
10
|
exclude=("tests",)),
|
|
11
11
|
install_requires=[
|
|
12
|
-
'hsmodels>=1.0.
|
|
12
|
+
'hsmodels>=1.0.4',
|
|
13
13
|
'requests',
|
|
14
14
|
'requests_oauthlib',
|
|
15
15
|
],
|
|
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
|