synapseclient 4.4.0__tar.gz → 4.4.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.
- {synapseclient-4.4.0/synapseclient.egg-info → synapseclient-4.4.2}/PKG-INFO +5 -5
- {synapseclient-4.4.0 → synapseclient-4.4.2}/setup.cfg +3 -3
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/client.py +9 -13
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/credentials/cred_data.py +19 -2
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/credentials/credential_provider.py +3 -1
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/download/download_async.py +3 -1
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/download/download_functions.py +5 -3
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/transfer_bar.py +1 -1
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/synapsePythonClient +1 -1
- {synapseclient-4.4.0 → synapseclient-4.4.2/synapseclient.egg-info}/PKG-INFO +5 -5
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient.egg-info/requires.txt +2 -1
- {synapseclient-4.4.0 → synapseclient-4.4.2}/MANIFEST.in +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/README.md +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/pyproject.toml +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/setup.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/.synapseConfig +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/__main__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/activity.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/annotations.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/annotations.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/configuration_services.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/entity_bundle_services_v2.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/entity_factory.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/entity_services.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/api/file_services.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/async_utils.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/cache.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/config.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/constants/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/constants/concrete_types.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/constants/config_file_constants.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/constants/limits.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/constants/method_flags.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/credentials/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/cumulative_transfer_progress.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/download/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/dozer.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/exceptions.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/lock.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/logging_setup.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/models/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/models/custom_json.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/models/dict_object.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/models/permission.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/multithread_download/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/multithread_download/download_threads.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/pool_provider.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/remote_file_storage_wrappers.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/retry.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/sts_transfer.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/multipart_upload.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/multipart_upload_async.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/upload_functions.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/upload_functions_async.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/upload_utils.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/utils.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/version_check.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/entity.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/evaluation.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/activity.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/annotations.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/evaluation.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/file.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/folder.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/mixins/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/mixins/access_control.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/mixins/storable_container.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/project.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/access_control_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/activity_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/annotations_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/file_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/folder_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/project_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/storable_container_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/table_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/team_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/user_protocol.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/services/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/services/search.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/services/storable_entity.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/services/storable_entity_components.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/table.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/team.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/user.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/wiki.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/services/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/services/json_schema.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/table.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/team.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/wiki.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient.egg-info/SOURCES.txt +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient.egg-info/dependency_links.txt +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient.egg-info/entry_points.txt +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient.egg-info/not-zip-safe +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient.egg-info/top_level.txt +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/__init__.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/copy_functions.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/describe_functions.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/migrate_functions.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/monitor.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/sync.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/synapseutils/walk_functions.py +0 -0
- {synapseclient-4.4.0 → synapseclient-4.4.2}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: synapseclient
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.2
|
|
4
4
|
Summary: A client for Synapse, a collaborative, open-source research platform that allows teams to share data, track analyses, and collaborate.
|
|
5
5
|
Home-page: https://www.synapse.org
|
|
6
6
|
Author: The Synapse Engineering Team
|
|
@@ -13,7 +13,6 @@ Project-URL: Changelog, https://python-docs.synapse.org/build/html/index.html#re
|
|
|
13
13
|
Platform: any
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -27,10 +26,10 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
27
26
|
Classifier: Topic :: Software Development :: Libraries
|
|
28
27
|
Classifier: Topic :: Scientific/Engineering
|
|
29
28
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
30
|
-
Requires-Python: >=3.
|
|
29
|
+
Requires-Python: >=3.9
|
|
31
30
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
32
31
|
Requires-Dist: requests<3.0,>=2.22.0
|
|
33
|
-
Requires-Dist: urllib3
|
|
32
|
+
Requires-Dist: urllib3>=2.6.3
|
|
34
33
|
Requires-Dist: deprecated<2.0,>=1.2.4
|
|
35
34
|
Requires-Dist: opentelemetry-api~=1.21.0
|
|
36
35
|
Requires-Dist: opentelemetry-sdk~=1.21.0
|
|
@@ -41,6 +40,7 @@ Requires-Dist: httpx~=0.27.0
|
|
|
41
40
|
Requires-Dist: tqdm<5.0,>=4.66.2
|
|
42
41
|
Requires-Dist: async-lru~=2.0.4
|
|
43
42
|
Requires-Dist: psutil~=5.9.8
|
|
43
|
+
Requires-Dist: setuptools>=80.10.1
|
|
44
44
|
Provides-Extra: dev
|
|
45
45
|
Requires-Dist: pytest<8.0,>=7.0.0; extra == "dev"
|
|
46
46
|
Requires-Dist: pytest-mock<4.0,>=3.0; extra == "dev"
|
|
@@ -17,7 +17,6 @@ platforms = any
|
|
|
17
17
|
classifiers =
|
|
18
18
|
Development Status :: 5 - Production/Stable
|
|
19
19
|
Programming Language :: Python
|
|
20
|
-
Programming Language :: Python :: 3.8
|
|
21
20
|
Programming Language :: Python :: 3.9
|
|
22
21
|
Programming Language :: Python :: 3.10
|
|
23
22
|
Programming Language :: Python :: 3.11
|
|
@@ -36,10 +35,10 @@ classifiers =
|
|
|
36
35
|
zip_safe = False
|
|
37
36
|
include_package_data = True
|
|
38
37
|
packages = find:
|
|
39
|
-
python_requires = >=3.
|
|
38
|
+
python_requires = >=3.9
|
|
40
39
|
install_requires =
|
|
41
40
|
requests>=2.22.0,<3.0
|
|
42
|
-
urllib3>=
|
|
41
|
+
urllib3>=2.6.3
|
|
43
42
|
deprecated>=1.2.4,<2.0
|
|
44
43
|
opentelemetry-api~=1.21.0
|
|
45
44
|
opentelemetry-sdk~=1.21.0
|
|
@@ -50,6 +49,7 @@ install_requires =
|
|
|
50
49
|
tqdm>=4.66.2,<5.0
|
|
51
50
|
async-lru~=2.0.4
|
|
52
51
|
psutil~=5.9.8
|
|
52
|
+
setuptools>=80.10.1
|
|
53
53
|
tests_require =
|
|
54
54
|
pytest>=7.0.0,<8.0
|
|
55
55
|
pytest-mock>=3.0,<4.0
|
|
@@ -277,6 +277,7 @@ class Synapse(object):
|
|
|
277
277
|
requests_session_async_synapse: httpx.AsyncClient = None,
|
|
278
278
|
requests_session_storage: httpx.Client = None,
|
|
279
279
|
asyncio_event_loop: asyncio.AbstractEventLoop = None,
|
|
280
|
+
cache_client: bool = True,
|
|
280
281
|
) -> "Synapse":
|
|
281
282
|
"""
|
|
282
283
|
Initialize Synapse object
|
|
@@ -300,6 +301,9 @@ class Synapse(object):
|
|
|
300
301
|
asyncio_event_loop: The event loop that is going to be used while executing
|
|
301
302
|
this code. This is optional and only used when you are manually
|
|
302
303
|
specifying an async HTTPX client.
|
|
304
|
+
cache_client: Whether to cache the Synapse client object in the Synapse module. Defaults to True.
|
|
305
|
+
When set to True anywhere a `Synapse` object is optional you do not need to pass an
|
|
306
|
+
instance of `Synapse` to that function, method, or class.
|
|
303
307
|
|
|
304
308
|
Raises:
|
|
305
309
|
ValueError: Warn for non-boolean debug value.
|
|
@@ -411,6 +415,8 @@ class Synapse(object):
|
|
|
411
415
|
self._parallel_file_transfer_semaphore = {}
|
|
412
416
|
self.use_boto_sts_transfers = transfer_config["use_boto_sts"]
|
|
413
417
|
self._parts_transfered_counter = 0
|
|
418
|
+
if cache_client:
|
|
419
|
+
Synapse.set_client(synapse_client=self)
|
|
414
420
|
|
|
415
421
|
def _get_requests_session_async_synapse(
|
|
416
422
|
self, asyncio_event_loop: asyncio.AbstractEventLoop
|
|
@@ -708,7 +714,6 @@ class Synapse(object):
|
|
|
708
714
|
email: str = None,
|
|
709
715
|
silent: bool = False,
|
|
710
716
|
authToken: str = None,
|
|
711
|
-
cache_client: bool = True,
|
|
712
717
|
) -> None:
|
|
713
718
|
"""
|
|
714
719
|
Valid combinations of login() arguments:
|
|
@@ -729,9 +734,6 @@ class Synapse(object):
|
|
|
729
734
|
authToken: A bearer authorization token, e.g. a
|
|
730
735
|
[personal access token](https://python-docs.synapse.org/tutorials/authentication/).
|
|
731
736
|
silent: Defaults to False. Suppresses the "Welcome ...!" message.
|
|
732
|
-
cache_client: Whether to cache the Synapse client object in the Synapse module. Defaults to True.
|
|
733
|
-
When set to True anywhere a `Synapse` object is optional you do not need to pass an
|
|
734
|
-
instance of `Synapse` to that function, method, or class.
|
|
735
737
|
|
|
736
738
|
Example: Logging in
|
|
737
739
|
Using an auth token:
|
|
@@ -770,17 +772,9 @@ class Synapse(object):
|
|
|
770
772
|
raise SynapseNoCredentialsError("No credentials provided.")
|
|
771
773
|
|
|
772
774
|
if not silent:
|
|
773
|
-
|
|
774
|
-
display_name = (
|
|
775
|
-
profile["displayName"]
|
|
776
|
-
if "displayName" in profile
|
|
777
|
-
else self.credentials.username
|
|
778
|
-
)
|
|
775
|
+
display_name = self.credentials.displayname or self.credentials.username
|
|
779
776
|
self.logger.info(f"Welcome, {display_name}!\n")
|
|
780
777
|
|
|
781
|
-
if cache_client:
|
|
782
|
-
Synapse.set_client(self)
|
|
783
|
-
|
|
784
778
|
@deprecated(
|
|
785
779
|
version="4.4.0",
|
|
786
780
|
reason="To be removed in 5.0.0. "
|
|
@@ -4935,6 +4929,7 @@ class Synapse(object):
|
|
|
4935
4929
|
destination=os.path.join(
|
|
4936
4930
|
cache_dir, str(wiki.markdownFileHandleId) + ".md"
|
|
4937
4931
|
),
|
|
4932
|
+
synapse_client=self,
|
|
4938
4933
|
),
|
|
4939
4934
|
syn=self,
|
|
4940
4935
|
)
|
|
@@ -5603,6 +5598,7 @@ class Synapse(object):
|
|
|
5603
5598
|
synapse_id=extract_synapse_id_from_query(query),
|
|
5604
5599
|
entity_type="TableEntity",
|
|
5605
5600
|
destination=os.path.join(download_dir, filename),
|
|
5601
|
+
synapse_client=self,
|
|
5606
5602
|
),
|
|
5607
5603
|
syn=self,
|
|
5608
5604
|
)
|
|
@@ -61,11 +61,14 @@ class SynapseAuthTokenCredentials(SynapseCredentials):
|
|
|
61
61
|
# ValueError if the split string is not base64 encoded or if the decoded base64 is not json
|
|
62
62
|
pass
|
|
63
63
|
|
|
64
|
-
def __init__(
|
|
64
|
+
def __init__(
|
|
65
|
+
self, token: str, username: str = None, displayname: str = None
|
|
66
|
+
) -> None:
|
|
65
67
|
self._validate_token(token)
|
|
66
68
|
|
|
67
69
|
self._token = token
|
|
68
70
|
self.username = username
|
|
71
|
+
self.displayname = displayname
|
|
69
72
|
|
|
70
73
|
@property
|
|
71
74
|
def username(self) -> str:
|
|
@@ -76,6 +79,15 @@ class SynapseAuthTokenCredentials(SynapseCredentials):
|
|
|
76
79
|
def username(self, username: str) -> None:
|
|
77
80
|
self._username = username
|
|
78
81
|
|
|
82
|
+
@property
|
|
83
|
+
def displayname(self) -> str:
|
|
84
|
+
"""The displayname associated with this token."""
|
|
85
|
+
return self._displayname
|
|
86
|
+
|
|
87
|
+
@displayname.setter
|
|
88
|
+
def displayname(self, displayname: str) -> None:
|
|
89
|
+
self._displayname = displayname
|
|
90
|
+
|
|
79
91
|
@property
|
|
80
92
|
def secret(self) -> str:
|
|
81
93
|
"""The bearer token."""
|
|
@@ -86,7 +98,12 @@ class SynapseAuthTokenCredentials(SynapseCredentials):
|
|
|
86
98
|
return r
|
|
87
99
|
|
|
88
100
|
def __repr__(self):
|
|
89
|
-
return
|
|
101
|
+
return (
|
|
102
|
+
f"SynapseAuthTokenCredentials("
|
|
103
|
+
f"username='{self.username}', "
|
|
104
|
+
f"displayname='{self.displayname}', "
|
|
105
|
+
f"token='{self.secret}')"
|
|
106
|
+
)
|
|
90
107
|
|
|
91
108
|
|
|
92
109
|
# a class that just contains args passed form synapse client login
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/credentials/credential_provider.py
RENAMED
|
@@ -77,6 +77,7 @@ class SynapseCredentialsProvider(metaclass=abc.ABCMeta):
|
|
|
77
77
|
profile = syn.restGET("/userProfile", auth=credentials)
|
|
78
78
|
profile_username = profile.get("userName")
|
|
79
79
|
profile_emails = profile.get("emails", [])
|
|
80
|
+
profile_displayname = profile.get("displayName")
|
|
80
81
|
|
|
81
82
|
if username and (
|
|
82
83
|
username != profile_username and username not in profile_emails
|
|
@@ -88,8 +89,9 @@ class SynapseCredentialsProvider(metaclass=abc.ABCMeta):
|
|
|
88
89
|
"username/email and auth_token both provided but username does not "
|
|
89
90
|
"match token profile"
|
|
90
91
|
)
|
|
91
|
-
|
|
92
92
|
credentials.username = profile_username
|
|
93
|
+
credentials.displayname = profile_displayname
|
|
94
|
+
|
|
93
95
|
return credentials
|
|
94
96
|
|
|
95
97
|
return None
|
|
@@ -314,7 +314,9 @@ class _MultithreadedDownloader:
|
|
|
314
314
|
syn=self._syn, url=url_info.url, debug=self._download_request.debug
|
|
315
315
|
)
|
|
316
316
|
self._progress_bar = get_or_create_download_progress_bar(
|
|
317
|
-
file_size=file_size,
|
|
317
|
+
file_size=file_size,
|
|
318
|
+
postfix=self._download_request.object_id,
|
|
319
|
+
synapse_client=self._syn,
|
|
318
320
|
)
|
|
319
321
|
self._prep_file()
|
|
320
322
|
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/download/download_functions.py
RENAMED
|
@@ -166,6 +166,7 @@ async def download_file_entity(
|
|
|
166
166
|
synapse_id=object_id,
|
|
167
167
|
entity_type=object_type,
|
|
168
168
|
destination=download_path,
|
|
169
|
+
synapse_client=client,
|
|
169
170
|
)
|
|
170
171
|
|
|
171
172
|
if download_path is None or not os.path.exists(download_path):
|
|
@@ -274,6 +275,7 @@ async def download_file_entity_model(
|
|
|
274
275
|
synapse_id=object_id,
|
|
275
276
|
entity_type=object_type,
|
|
276
277
|
destination=download_path,
|
|
278
|
+
synapse_client=client,
|
|
277
279
|
)
|
|
278
280
|
|
|
279
281
|
if download_path is None or not os.path.exists(download_path):
|
|
@@ -416,7 +418,7 @@ async def download_by_file_handle(
|
|
|
416
418
|
)
|
|
417
419
|
|
|
418
420
|
progress_bar = get_or_create_download_progress_bar(
|
|
419
|
-
file_size=1, postfix=synapse_id
|
|
421
|
+
file_size=1, postfix=synapse_id, synapse_client=syn
|
|
420
422
|
)
|
|
421
423
|
loop = asyncio.get_running_loop()
|
|
422
424
|
downloaded_path = await loop.run_in_executor(
|
|
@@ -440,7 +442,7 @@ async def download_by_file_handle(
|
|
|
440
442
|
and concrete_type == concrete_types.S3_FILE_HANDLE
|
|
441
443
|
):
|
|
442
444
|
progress_bar = get_or_create_download_progress_bar(
|
|
443
|
-
file_size=1, postfix=synapse_id
|
|
445
|
+
file_size=1, postfix=synapse_id, synapse_client=syn
|
|
444
446
|
)
|
|
445
447
|
|
|
446
448
|
def download_fn(
|
|
@@ -496,7 +498,7 @@ async def download_by_file_handle(
|
|
|
496
498
|
else:
|
|
497
499
|
loop = asyncio.get_running_loop()
|
|
498
500
|
progress_bar = get_or_create_download_progress_bar(
|
|
499
|
-
file_size=1, postfix=synapse_id
|
|
501
|
+
file_size=1, postfix=synapse_id, synapse_client=syn
|
|
500
502
|
)
|
|
501
503
|
downloaded_path = await loop.run_in_executor(
|
|
502
504
|
syn._get_thread_pool_executor(asyncio_event_loop=loop),
|
|
@@ -85,7 +85,7 @@ def shared_download_progress_bar(
|
|
|
85
85
|
|
|
86
86
|
syn = Synapse.get_client(synapse_client=synapse_client)
|
|
87
87
|
with logging_redirect_tqdm(loggers=[syn.logger]):
|
|
88
|
-
get_or_create_download_progress_bar(file_size=file_size)
|
|
88
|
+
get_or_create_download_progress_bar(file_size=file_size, synapse_client=syn)
|
|
89
89
|
try:
|
|
90
90
|
yield
|
|
91
91
|
finally:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: synapseclient
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.2
|
|
4
4
|
Summary: A client for Synapse, a collaborative, open-source research platform that allows teams to share data, track analyses, and collaborate.
|
|
5
5
|
Home-page: https://www.synapse.org
|
|
6
6
|
Author: The Synapse Engineering Team
|
|
@@ -13,7 +13,6 @@ Project-URL: Changelog, https://python-docs.synapse.org/build/html/index.html#re
|
|
|
13
13
|
Platform: any
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -27,10 +26,10 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
27
26
|
Classifier: Topic :: Software Development :: Libraries
|
|
28
27
|
Classifier: Topic :: Scientific/Engineering
|
|
29
28
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
30
|
-
Requires-Python: >=3.
|
|
29
|
+
Requires-Python: >=3.9
|
|
31
30
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
32
31
|
Requires-Dist: requests<3.0,>=2.22.0
|
|
33
|
-
Requires-Dist: urllib3
|
|
32
|
+
Requires-Dist: urllib3>=2.6.3
|
|
34
33
|
Requires-Dist: deprecated<2.0,>=1.2.4
|
|
35
34
|
Requires-Dist: opentelemetry-api~=1.21.0
|
|
36
35
|
Requires-Dist: opentelemetry-sdk~=1.21.0
|
|
@@ -41,6 +40,7 @@ Requires-Dist: httpx~=0.27.0
|
|
|
41
40
|
Requires-Dist: tqdm<5.0,>=4.66.2
|
|
42
41
|
Requires-Dist: async-lru~=2.0.4
|
|
43
42
|
Requires-Dist: psutil~=5.9.8
|
|
43
|
+
Requires-Dist: setuptools>=80.10.1
|
|
44
44
|
Provides-Extra: dev
|
|
45
45
|
Requires-Dist: pytest<8.0,>=7.0.0; extra == "dev"
|
|
46
46
|
Requires-Dist: pytest-mock<4.0,>=3.0; extra == "dev"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
requests<3.0,>=2.22.0
|
|
2
|
-
urllib3
|
|
2
|
+
urllib3>=2.6.3
|
|
3
3
|
deprecated<2.0,>=1.2.4
|
|
4
4
|
opentelemetry-api~=1.21.0
|
|
5
5
|
opentelemetry-sdk~=1.21.0
|
|
@@ -10,6 +10,7 @@ httpx~=0.27.0
|
|
|
10
10
|
tqdm<5.0,>=4.66.2
|
|
11
11
|
async-lru~=2.0.4
|
|
12
12
|
psutil~=5.9.8
|
|
13
|
+
setuptools>=80.10.1
|
|
13
14
|
|
|
14
15
|
[boto3]
|
|
15
16
|
boto3<2.0,>=1.7.0
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/constants/config_file_constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/cumulative_transfer_progress.py
RENAMED
|
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
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/multithread_download/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/remote_file_storage_wrappers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/multipart_upload_async.py
RENAMED
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/core/upload/upload_functions_async.py
RENAMED
|
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
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/mixins/storable_container.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/activity_protocol.py
RENAMED
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/annotations_protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/folder_protocol.py
RENAMED
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/project_protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/protocols/table_protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{synapseclient-4.4.0 → synapseclient-4.4.2}/synapseclient/models/services/storable_entity.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|