synapseclient 4.5.0__tar.gz → 4.6.0__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.
Files changed (110) hide show
  1. {synapseclient-4.5.0/synapseclient.egg-info → synapseclient-4.6.0}/PKG-INFO +10 -6
  2. {synapseclient-4.5.0 → synapseclient-4.6.0}/README.md +3 -2
  3. {synapseclient-4.5.0 → synapseclient-4.6.0}/setup.cfg +6 -3
  4. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/__init__.py +3 -6
  5. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/annotations.py +6 -4
  6. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/entity_bundle_services_v2.py +12 -8
  7. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/entity_factory.py +13 -7
  8. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/entity_services.py +27 -18
  9. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/file_services.py +30 -20
  10. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/client.py +151 -143
  11. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/credentials/cred_data.py +17 -1
  12. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/credentials/credential_provider.py +1 -0
  13. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/download/download_async.py +3 -17
  14. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/download/download_functions.py +24 -13
  15. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/transfer_bar.py +3 -2
  16. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/upload/multipart_upload.py +2 -7
  17. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/upload/multipart_upload_async.py +2 -10
  18. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/utils.py +46 -37
  19. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/version_check.py +3 -6
  20. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/activity.py +29 -43
  21. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/annotations.py +3 -2
  22. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/file.py +46 -51
  23. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/folder.py +37 -44
  24. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/mixins/access_control.py +20 -34
  25. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/mixins/storable_container.py +24 -19
  26. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/project.py +32 -45
  27. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/access_control_protocol.py +9 -6
  28. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/activity_protocol.py +12 -8
  29. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/annotations_protocol.py +3 -2
  30. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/file_protocol.py +21 -14
  31. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/folder_protocol.py +12 -8
  32. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/project_protocol.py +12 -8
  33. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/storable_container_protocol.py +3 -2
  34. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/table_protocol.py +19 -13
  35. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/team_protocol.py +24 -16
  36. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/user_protocol.py +12 -8
  37. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/services/search.py +6 -12
  38. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/services/storable_entity.py +3 -2
  39. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/services/storable_entity_components.py +6 -4
  40. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/table.py +40 -62
  41. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/team.py +48 -71
  42. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/user.py +23 -36
  43. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/synapsePythonClient +1 -1
  44. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/table.py +43 -21
  45. {synapseclient-4.5.0 → synapseclient-4.6.0/synapseclient.egg-info}/PKG-INFO +10 -6
  46. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient.egg-info/requires.txt +4 -1
  47. {synapseclient-4.5.0 → synapseclient-4.6.0}/MANIFEST.in +0 -0
  48. {synapseclient-4.5.0 → synapseclient-4.6.0}/pyproject.toml +0 -0
  49. {synapseclient-4.5.0 → synapseclient-4.6.0}/setup.py +0 -0
  50. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/.synapseConfig +0 -0
  51. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/__main__.py +0 -0
  52. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/activity.py +0 -0
  53. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/annotations.py +0 -0
  54. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/__init__.py +0 -0
  55. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/api/configuration_services.py +0 -0
  56. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/__init__.py +0 -0
  57. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/async_utils.py +0 -0
  58. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/cache.py +0 -0
  59. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/config.py +0 -0
  60. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/constants/__init__.py +0 -0
  61. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/constants/concrete_types.py +0 -0
  62. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/constants/config_file_constants.py +0 -0
  63. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/constants/limits.py +0 -0
  64. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/constants/method_flags.py +0 -0
  65. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/credentials/__init__.py +0 -0
  66. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/cumulative_transfer_progress.py +0 -0
  67. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/download/__init__.py +0 -0
  68. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/dozer.py +0 -0
  69. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/exceptions.py +0 -0
  70. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/lock.py +0 -0
  71. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/logging_setup.py +0 -0
  72. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/models/__init__.py +0 -0
  73. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/models/custom_json.py +0 -0
  74. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/models/dict_object.py +0 -0
  75. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/models/permission.py +0 -0
  76. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/multithread_download/__init__.py +0 -0
  77. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/multithread_download/download_threads.py +0 -0
  78. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/pool_provider.py +0 -0
  79. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/remote_file_storage_wrappers.py +0 -0
  80. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/retry.py +0 -0
  81. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/sts_transfer.py +0 -0
  82. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/upload/__init__.py +0 -0
  83. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/upload/upload_functions.py +0 -0
  84. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/upload/upload_functions_async.py +0 -0
  85. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/core/upload/upload_utils.py +0 -0
  86. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/entity.py +0 -0
  87. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/evaluation.py +0 -0
  88. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/__init__.py +0 -0
  89. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/evaluation.py +0 -0
  90. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/mixins/__init__.py +0 -0
  91. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/protocols/__init__.py +0 -0
  92. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/services/__init__.py +0 -0
  93. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/models/wiki.py +0 -0
  94. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/services/__init__.py +0 -0
  95. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/services/json_schema.py +0 -0
  96. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/team.py +0 -0
  97. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient/wiki.py +0 -0
  98. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient.egg-info/SOURCES.txt +0 -0
  99. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient.egg-info/dependency_links.txt +0 -0
  100. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient.egg-info/entry_points.txt +0 -0
  101. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient.egg-info/not-zip-safe +0 -0
  102. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseclient.egg-info/top_level.txt +0 -0
  103. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/__init__.py +0 -0
  104. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/copy_functions.py +0 -0
  105. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/describe_functions.py +0 -0
  106. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/migrate_functions.py +0 -0
  107. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/monitor.py +0 -0
  108. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/sync.py +0 -0
  109. {synapseclient-4.5.0 → synapseclient-4.6.0}/synapseutils/walk_functions.py +0 -0
  110. {synapseclient-4.5.0 → synapseclient-4.6.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: synapseclient
3
- Version: 4.5.0
3
+ Version: 4.6.0
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,10 +13,10 @@ 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
19
+ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Operating System :: MacOS
21
21
  Classifier: Operating System :: Microsoft :: Windows
22
22
  Classifier: Operating System :: Unix
@@ -27,7 +27,7 @@ Classifier: License :: OSI Approved :: Apache Software License
27
27
  Classifier: Topic :: Software Development :: Libraries
28
28
  Classifier: Topic :: Scientific/Engineering
29
29
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
30
- Requires-Python: >=3.8
30
+ Requires-Python: <3.13,>=3.9
31
31
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
32
32
  Requires-Dist: requests<3.0,>=2.22.0
33
33
  Requires-Dist: urllib3<2,>=1.26.18
@@ -35,6 +35,10 @@ Requires-Dist: deprecated<2.0,>=1.2.4
35
35
  Requires-Dist: opentelemetry-api>=1.21.0
36
36
  Requires-Dist: opentelemetry-sdk>=1.21.0
37
37
  Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.21.0
38
+ Requires-Dist: opentelemetry-instrumentation-httpx>=0.48b0
39
+ Requires-Dist: opentelemetry-instrumentation-requests>=0.48b0
40
+ Requires-Dist: opentelemetry-instrumentation-threading>=0.48b0
41
+ Requires-Dist: opentelemetry-instrumentation-urllib>=0.48b0
38
42
  Requires-Dist: nest-asyncio~=1.6.0
39
43
  Requires-Dist: asyncio-atexit~=1.0.1
40
44
  Requires-Dist: httpx~=0.27.0
@@ -67,7 +71,6 @@ Requires-Dist: pytest-cov~=4.1.0; extra == "tests"
67
71
  Requires-Dist: pandas<3.0,>=1.5; extra == "tests"
68
72
  Provides-Extra: pandas
69
73
  Requires-Dist: pandas<3.0,>=1.5; extra == "pandas"
70
- Requires-Dist: numpy<2.0.0; extra == "pandas"
71
74
  Provides-Extra: pysftp
72
75
  Requires-Dist: pysftp<0.3,>=0.2.8; extra == "pysftp"
73
76
  Provides-Extra: boto3
@@ -119,9 +122,9 @@ or by sending an email to [python-announce+subscribe@sagebase.org](mailto:python
119
122
  Installation
120
123
  ------------
121
124
 
122
- The Python Synapse client has been tested on 3.8, 3.9, 3.10 and 3.11 on Mac OS X, Ubuntu Linux and Windows.
125
+ The Python Synapse client has been tested on versions 3.9, 3.10, 3.11 and 3.12 on Mac OS X, Ubuntu Linux and Windows.
123
126
 
124
- **Starting from Synapse Python client version 3.0, Synapse Python client requires Python >= 3.8**
127
+ **Starting from Synapse Python client version 3.0, Synapse Python client requires Python >= 3.9**
125
128
 
126
129
  ### Install using pip
127
130
 
@@ -396,6 +399,7 @@ trace.set_tracer_provider(
396
399
  )
397
400
  trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
398
401
  tracer = trace.get_tracer("my_tracer")
402
+ synapseclient.Synapse.enable_open_telemetry(True)
399
403
 
400
404
  @tracer.start_as_current_span("my_span_name")
401
405
  def main():
@@ -36,9 +36,9 @@ or by sending an email to [python-announce+subscribe@sagebase.org](mailto:python
36
36
  Installation
37
37
  ------------
38
38
 
39
- The Python Synapse client has been tested on 3.8, 3.9, 3.10 and 3.11 on Mac OS X, Ubuntu Linux and Windows.
39
+ The Python Synapse client has been tested on versions 3.9, 3.10, 3.11 and 3.12 on Mac OS X, Ubuntu Linux and Windows.
40
40
 
41
- **Starting from Synapse Python client version 3.0, Synapse Python client requires Python >= 3.8**
41
+ **Starting from Synapse Python client version 3.0, Synapse Python client requires Python >= 3.9**
42
42
 
43
43
  ### Install using pip
44
44
 
@@ -313,6 +313,7 @@ trace.set_tracer_provider(
313
313
  )
314
314
  trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
315
315
  tracer = trace.get_tracer("my_tracer")
316
+ synapseclient.Synapse.enable_open_telemetry(True)
316
317
 
317
318
  @tracer.start_as_current_span("my_span_name")
318
319
  def main():
@@ -17,10 +17,10 @@ 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
23
+ Programming Language :: Python :: 3.12
24
24
  Operating System :: MacOS
25
25
  Operating System :: Microsoft :: Windows
26
26
  Operating System :: Unix
@@ -36,7 +36,7 @@ classifiers =
36
36
  zip_safe = False
37
37
  include_package_data = True
38
38
  packages = find:
39
- python_requires = >=3.8
39
+ python_requires = >=3.9, <3.13
40
40
  install_requires =
41
41
  requests>=2.22.0,<3.0
42
42
  urllib3>=1.26.18,<2
@@ -44,6 +44,10 @@ install_requires =
44
44
  opentelemetry-api>=1.21.0
45
45
  opentelemetry-sdk>=1.21.0
46
46
  opentelemetry-exporter-otlp-proto-http>=1.21.0
47
+ opentelemetry-instrumentation-httpx>=0.48b0
48
+ opentelemetry-instrumentation-requests>=0.48b0
49
+ opentelemetry-instrumentation-threading>=0.48b0
50
+ opentelemetry-instrumentation-urllib>=0.48b0
47
51
  nest-asyncio~=1.6.0
48
52
  asyncio-atexit~=1.0.1
49
53
  httpx~=0.27.0
@@ -89,7 +93,6 @@ tests =
89
93
  pandas>=1.5,<3.0
90
94
  pandas =
91
95
  pandas>=1.5,<3.0
92
- numpy<2.0.0
93
96
  pysftp =
94
97
  pysftp>=0.2.8,<0.3
95
98
  boto3 =
@@ -31,12 +31,9 @@ from .table import (
31
31
  from .team import Team, TeamMember, UserGroupHeader, UserProfile
32
32
  from .wiki import Wiki
33
33
 
34
- # ref = importlib.resources.files(__name__).joinpath("synapsePythonClient")
35
- # with ref.open("r") as fp:
36
- # __version__ = json.load(fp)["latestVersion"]
37
- # TODO: switch to the above after python 3.8 is deprecated
38
- with importlib.resources.path(__name__, "synapsePythonClient") as ref:
39
- __version__ = json.load(open(ref))["latestVersion"]
34
+ ref = importlib.resources.files(__name__).joinpath("synapsePythonClient")
35
+ with ref.open("r") as fp:
36
+ __version__ = json.load(fp)["latestVersion"]
40
37
 
41
38
  __all__ = [
42
39
  # objects
@@ -24,8 +24,9 @@ def set_annotations(
24
24
  Arguments:
25
25
  annotations: The annotations to set. This is expected to have the id, etag,
26
26
  and annotations filled in.
27
- synapse_client: If not passed in or None this will use the last client from
28
- the `.login()` method.
27
+ synapse_client: If not passed in and caching was not disabled by
28
+ `Synapse.allow_client_caching(False)` this will use the last created
29
+ instance from the Synapse class constructor.
29
30
 
30
31
  Returns: The annotations set in Synapse.
31
32
  """
@@ -58,8 +59,9 @@ async def set_annotations_async(
58
59
  Arguments:
59
60
  annotations: The annotations to set. This is expected to have the id, etag,
60
61
  and annotations filled in.
61
- synapse_client: If not passed in or None this will use the last client from
62
- the `.login()` method.
62
+ synapse_client: If not passed in and caching was not disabled by
63
+ `Synapse.allow_client_caching(False)` this will use the last created
64
+ instance from the Synapse class constructor.
63
65
 
64
66
  Returns: The annotations set in Synapse.
65
67
  """
@@ -26,8 +26,9 @@ async def get_entity_id_bundle2(
26
26
  - includeAnnotations: True
27
27
  - includeFileHandles: True
28
28
  - includeRestrictionInformation: True
29
- synapse_client: If not passed in or None this will use the last client from
30
- the `.login()` method.
29
+ synapse_client: If not passed in and caching was not disabled by
30
+ `Synapse.allow_client_caching(False)` this will use the last created
31
+ instance from the Synapse class constructor.
31
32
 
32
33
  Returns:
33
34
  The requested entity bundle matching
@@ -69,8 +70,9 @@ async def get_entity_id_version_bundle2(
69
70
  - includeAnnotations: True
70
71
  - includeFileHandles: True
71
72
  - includeRestrictionInformation: True
72
- synapse_client: If not passed in or None this will use the last client from
73
- the `.login()` method.
73
+ synapse_client: If not passed in and caching was not disabled by
74
+ `Synapse.allow_client_caching(False)` this will use the last created
75
+ instance from the Synapse class constructor.
74
76
 
75
77
  Returns:
76
78
  The requested entity bundle matching
@@ -103,8 +105,9 @@ async def post_entity_bundle2_create(
103
105
  request: The request for the bundle matching
104
106
  <https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundleCreate.html>
105
107
  generated_by: The ID of the activity to associate with the entity.
106
- synapse_client: If not passed in or None this will use the last client from
107
- the `.login()` method.
108
+ synapse_client: If not passed in and caching was not disabled by
109
+ `Synapse.allow_client_caching(False)` this will use the last created
110
+ instance from the Synapse class constructor.
108
111
 
109
112
  Returns:
110
113
  The requested entity bundle matching
@@ -133,8 +136,9 @@ async def put_entity_id_bundle2(
133
136
  request: The request for the bundle matching
134
137
  <https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundleCreate.html>
135
138
  generated_by: The ID of the activity to associate with the entity.
136
- synapse_client: If not passed in or None this will use the last client from
137
- the `.login()` method.
139
+ synapse_client: If not passed in and caching was not disabled by
140
+ `Synapse.allow_client_caching(False)` this will use the last created
141
+ instance from the Synapse class constructor.
138
142
 
139
143
  Returns:
140
144
  The requested entity bundle matching
@@ -59,8 +59,9 @@ async def get_from_entity_factory(
59
59
  hop to the target of the link.
60
60
  entity_to_update: An existing entity class instance to update with data from
61
61
  Synapse.
62
- synapse_client: If not passed in or None this will use the last client from
63
- the `.login()` method.
62
+ synapse_client: If not passed in and caching was not disabled by
63
+ `Synapse.allow_client_caching(False)` this will use the last created
64
+ instance from the Synapse class constructor.
64
65
 
65
66
  Example: Using this function
66
67
  Download file into cache
@@ -127,7 +128,10 @@ async def get_from_entity_factory(
127
128
 
128
129
  # Check and warn for unmet access requirements
129
130
  _check_entity_restrictions(
130
- bundle=bundle, synapse_id=bundle["entity"]["id"], download_file=download_file
131
+ bundle=bundle,
132
+ synapse_id=bundle["entity"]["id"],
133
+ download_file=download_file,
134
+ synapse_client=synapse_client,
131
135
  )
132
136
 
133
137
  return_data = await _cast_into_class_type(
@@ -166,8 +170,9 @@ async def _search_for_file_by_md5(
166
170
  md5: The MD5 of the file to retrieve. If not passed in, the MD5 will be
167
171
  calculated.
168
172
  limit_search: Limit the search to a specific project or folder.
169
- synapse_client: If not passed in or None this will use the last client from
170
- the `.login()` method.
173
+ synapse_client: If not passed in and caching was not disabled by
174
+ `Synapse.allow_client_caching(False)` this will use the last created
175
+ instance from the Synapse class constructor.
171
176
 
172
177
  Returns:
173
178
  A dictionary containing the entity bundle of the file found.
@@ -255,8 +260,9 @@ async def _cast_into_class_type(
255
260
  hop to the target of the link.
256
261
  entity_to_update: An existing entity class instance to update with data from
257
262
  Synapse.
258
- synapse_client: If not passed in or None this will use the last client from
259
- the `.login()` method.
263
+ synapse_client: If not passed in and caching was not disabled by
264
+ `Synapse.allow_client_caching(False)` this will use the last created
265
+ instance from the Synapse class constructor.
260
266
 
261
267
  Returns:
262
268
  A Synapse entity object.
@@ -22,8 +22,9 @@ async def post_entity(
22
22
  request: The request for the entity matching
23
23
  <https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Entity.html>
24
24
  generated_by: The ID of the activity to associate with the entity.
25
- synapse_client: If not passed in or None this will use the last client from
26
- the `.login()` method.
25
+ synapse_client: If not passed in and caching was not disabled by
26
+ `Synapse.allow_client_caching(False)` this will use the last created
27
+ instance from the Synapse class constructor.
27
28
 
28
29
  Returns:
29
30
  The requested entity matching
@@ -55,8 +56,9 @@ async def put_entity(
55
56
  <https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Entity.html>
56
57
  new_version: If true, a new version of the entity will be created.
57
58
  generated_by: The ID of the activity to associate with the entity.
58
- synapse_client: If not passed in or None this will use the last client from
59
- the `.login()` method.
59
+ synapse_client: If not passed in and caching was not disabled by
60
+ `Synapse.allow_client_caching(False)` this will use the last created
61
+ instance from the Synapse class constructor.
60
62
 
61
63
  Returns:
62
64
  The requested entity bundle matching
@@ -84,8 +86,9 @@ async def get_entity(
84
86
  """
85
87
  Arguments:
86
88
  entity_id: The ID of the entity.
87
- synapse_client: If not passed in or None this will use the last client from
88
- the `.login()` method.
89
+ synapse_client: If not passed in and caching was not disabled by
90
+ `Synapse.allow_client_caching(False)` this will use the last created
91
+ instance from the Synapse class constructor.
89
92
 
90
93
  Returns:
91
94
  The requested entity bundle matching
@@ -113,8 +116,9 @@ async def get_upload_destination(
113
116
 
114
117
  Arguments:
115
118
  entity_id: The ID of the entity.
116
- synapse_client: If not passed in or None this will use the last client from
117
- the `.login()` method.
119
+ synapse_client: If not passed in and caching was not disabled by
120
+ `Synapse.allow_client_caching(False)` this will use the last created
121
+ instance from the Synapse class constructor.
118
122
 
119
123
  Returns:
120
124
  The upload destination.
@@ -138,8 +142,9 @@ async def get_upload_destination_location(
138
142
  Arguments:
139
143
  entity_id: The ID of the entity.
140
144
  location: A storage location ID of the upload destination.
141
- synapse_client: If not passed in or None this will use the last client from
142
- the `.login()` method.
145
+ synapse_client: If not passed in and caching was not disabled by
146
+ `Synapse.allow_client_caching(False)` this will use the last created
147
+ instance from the Synapse class constructor.
143
148
 
144
149
  Returns:
145
150
  The upload destination.
@@ -162,8 +167,9 @@ async def create_access_requirements_if_none(
162
167
 
163
168
  Arguments:
164
169
  entity_id: The ID of the entity.
165
- synapse_client: If not passed in or None this will use the last client from
166
- the `.login()` method.
170
+ synapse_client: If not passed in and caching was not disabled by
171
+ `Synapse.allow_client_caching(False)` this will use the last created
172
+ instance from the Synapse class constructor.
167
173
  """
168
174
  from synapseclient import Synapse
169
175
 
@@ -195,8 +201,9 @@ async def delete_entity_generated_by(
195
201
  """
196
202
  Arguments:
197
203
  entity_id: The ID of the entity.
198
- synapse_client: If not passed in or None this will use the last client from
199
- the `.login()` method.
204
+ synapse_client: If not passed in and caching was not disabled by
205
+ `Synapse.allow_client_caching(False)` this will use the last created
206
+ instance from the Synapse class constructor.
200
207
 
201
208
  Returns: None
202
209
  """
@@ -219,8 +226,9 @@ async def get_entity_path(
219
226
 
220
227
  Arguments:
221
228
  entity_id: The ID of the entity.
222
- synapse_client: If not passed in or None this will use the last client from
223
- the `.login()` method.
229
+ synapse_client: If not passed in and caching was not disabled by
230
+ `Synapse.allow_client_caching(False)` this will use the last created
231
+ instance from the Synapse class constructor.
224
232
 
225
233
  Returns:
226
234
  Entity paths matching:
@@ -245,8 +253,9 @@ async def get_entities_by_md5(
245
253
 
246
254
  Arguments:
247
255
  md5: The MD5 of the entity.
248
- synapse_client: If not passed in or None this will use the last client from
249
- the `.login()` method.
256
+ synapse_client: If not passed in and caching was not disabled by
257
+ `Synapse.allow_client_caching(False)` this will use the last created
258
+ instance from the Synapse class constructor.
250
259
 
251
260
  Returns:
252
261
  Paginated results of:
@@ -36,8 +36,9 @@ async def post_file_multipart(
36
36
  force_restart: Optional parameter. When True, any upload state for the given
37
37
  file will be cleared and a new upload will be started.
38
38
  endpoint: Server endpoint to call to.
39
- synapse_client: If not passed in or None this will use the last client from
40
- the `.login()` method.
39
+ synapse_client: If not passed in and caching was not disabled by
40
+ `Synapse.allow_client_caching(False)` this will use the last created
41
+ instance from the Synapse class constructor.
41
42
 
42
43
  Returns:
43
44
  The requested multipart upload status matching
@@ -87,8 +88,9 @@ async def put_file_multipart_add(
87
88
  md5_hex: The MD5 of the uploaded part represented as a hexadecimal string. If
88
89
  the provided MD5 does not match the MD5 of the uploaded part, the add
89
90
  will fail.
90
- synapse_client: If not passed in or None this will use the last client from
91
- the `.login()` method.
91
+ synapse_client: If not passed in and caching was not disabled by
92
+ `Synapse.allow_client_caching(False)` this will use the last created
93
+ instance from the Synapse class constructor.
92
94
 
93
95
  Returns:
94
96
  Object matching
@@ -126,8 +128,9 @@ async def put_file_multipart_complete(
126
128
  Arguments:
127
129
  upload_id: The unique identifier of the file upload.
128
130
  endpoint: Server endpoint to call to.
129
- synapse_client: If not passed in or None this will use the last client from
130
- the `.login()` method.
131
+ synapse_client: If not passed in and caching was not disabled by
132
+ `Synapse.allow_client_caching(False)` this will use the last created
133
+ instance from the Synapse class constructor.
131
134
 
132
135
  Returns:
133
136
  Object matching
@@ -154,8 +157,9 @@ async def post_file_multipart_presigned_urls(
154
157
  Arguments:
155
158
  upload_id: The unique identifier of the file upload.
156
159
  part_numbers: The part numbers to get pre-signed URLs for.
157
- synapse_client: If not passed in or None this will use the last client from
158
- the `.login()` method.
160
+ synapse_client: If not passed in and caching was not disabled by
161
+ `Synapse.allow_client_caching(False)` this will use the last created
162
+ instance from the Synapse class constructor.
159
163
 
160
164
  Returns:
161
165
  Object matching
@@ -199,8 +203,9 @@ async def post_external_object_store_filehandle(
199
203
  storage_location_id: The optional storage location descriptor
200
204
  mimetype: The Mimetype of the file, if known.
201
205
  md5: The file's content MD5, if known.
202
- synapse_client: If not passed in or None this will use the last client from
203
- the `.login()` method.
206
+ synapse_client: If not passed in and caching was not disabled by
207
+ `Synapse.allow_client_caching(False)` this will use the last created
208
+ instance from the Synapse class constructor.
204
209
 
205
210
  Returns:
206
211
  A FileHandle for objects that are stored externally.
@@ -243,8 +248,9 @@ async def post_external_filehandle(
243
248
  mimetype: The Mimetype of the file, if known.
244
249
  md5: The file's content MD5.
245
250
  file_size: The size of the file in bytes.
246
- synapse_client: If not passed in or None this will use the last client from
247
- the `.login()` method.
251
+ synapse_client: If not passed in and caching was not disabled by
252
+ `Synapse.allow_client_caching(False)` this will use the last created
253
+ instance from the Synapse class constructor.
248
254
 
249
255
  Returns:
250
256
  A FileHandle for objects that are stored externally.
@@ -299,8 +305,9 @@ async def post_external_s3_file_handle(
299
305
  mutually exclusive with parent
300
306
  mimetype: Mimetype of the file, if known
301
307
  md5: MD5 of the file, if known
302
- synapse_client: If not passed in or None this will use the last client from
303
- the `.login()` method.
308
+ synapse_client: If not passed in and caching was not disabled by
309
+ `Synapse.allow_client_caching(False)` this will use the last created
310
+ instance from the Synapse class constructor.
304
311
 
305
312
  Returns:
306
313
  The created file handle.
@@ -360,8 +367,9 @@ async def get_file_handle(
360
367
 
361
368
  Arguments:
362
369
  file_handle_id: The ID of the file handle to look up.
363
- synapse_client: If not passed in or None this will use the last client from
364
- the `.login()` method.
370
+ synapse_client: If not passed in and caching was not disabled by
371
+ `Synapse.allow_client_caching(False)` this will use the last created
372
+ instance from the Synapse class constructor.
365
373
 
366
374
  Returns:
367
375
  A file handle retrieved from the file handle service.
@@ -392,8 +400,9 @@ async def get_file_handle_for_download_async(
392
400
  entity_type: Type of object associated with a file e.g. FileEntity,
393
401
  TableEntity
394
402
  <https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/file/FileHandleAssociateType.html>
395
- synapse_client: If not passed in or None this will use the last client from
396
- the `.login()` method.
403
+ synapse_client: If not passed in and caching was not disabled by
404
+ `Synapse.allow_client_caching(False)` this will use the last created
405
+ instance from the Synapse class constructor.
397
406
 
398
407
  Raises:
399
408
  SynapseFileNotFoundError: If the fileHandleId is not found in Synapse.
@@ -452,8 +461,9 @@ def get_file_handle_for_download(
452
461
  entity_type: Type of object associated with a file e.g. FileEntity,
453
462
  TableEntity
454
463
  <https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/file/FileHandleAssociateType.html>
455
- synapse_client: If not passed in or None this will use the last client from
456
- the `.login()` method.
464
+ synapse_client: If not passed in and caching was not disabled by
465
+ `Synapse.allow_client_caching(False)` this will use the last created
466
+ instance from the Synapse class constructor.
457
467
 
458
468
  Raises:
459
469
  SynapseFileNotFoundError: If the fileHandleId is not found in Synapse.