synapseclient 4.7.0__tar.gz → 4.9.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.
- {synapseclient-4.7.0/synapseclient.egg-info → synapseclient-4.9.0}/PKG-INFO +80 -38
- {synapseclient-4.7.0 → synapseclient-4.9.0}/README.md +69 -29
- {synapseclient-4.7.0 → synapseclient-4.9.0}/setup.cfg +11 -9
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/.synapseConfig +11 -3
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/__main__.py +79 -32
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/__init__.py +45 -0
- synapseclient-4.9.0/synapseclient/api/api_client.py +56 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/configuration_services.py +21 -3
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/entity_factory.py +130 -73
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/entity_services.py +274 -0
- synapseclient-4.9.0/synapseclient/api/json_schema_services.py +221 -0
- synapseclient-4.9.0/synapseclient/api/table_services.py +185 -0
- synapseclient-4.9.0/synapseclient/api/team_services.py +43 -0
- synapseclient-4.9.0/synapseclient/api/user_services.py +42 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/client.py +479 -99
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/async_utils.py +30 -39
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/constants/concrete_types.py +15 -1
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/credentials/cred_data.py +37 -14
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/credentials/credential_provider.py +75 -22
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/cumulative_transfer_progress.py +34 -37
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/download/download_async.py +52 -3
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/download/download_functions.py +145 -6
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/exceptions.py +5 -0
- synapseclient-4.9.0/synapseclient/core/models/acl.py +190 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/models/permission.py +1 -1
- synapseclient-4.9.0/synapseclient/core/otel_config.py +234 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/remote_file_storage_wrappers.py +2 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/transfer_bar.py +10 -4
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/upload/multipart_upload.py +18 -4
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/upload/multipart_upload_async.py +277 -25
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/upload/upload_functions.py +6 -2
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/upload/upload_functions_async.py +91 -30
- synapseclient-4.9.0/synapseclient/core/upload/upload_utils.py +237 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/utils.py +113 -18
- synapseclient-4.9.0/synapseclient/core/version_check.py +308 -0
- synapseclient-4.9.0/synapseclient/models/__init__.py +97 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/activity.py +18 -11
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/annotations.py +1 -1
- synapseclient-4.9.0/synapseclient/models/dataset.py +2806 -0
- synapseclient-4.9.0/synapseclient/models/entityview.py +1181 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/file.py +11 -2
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/folder.py +17 -2
- synapseclient-4.9.0/synapseclient/models/materializedview.py +865 -0
- synapseclient-4.9.0/synapseclient/models/mixins/__init__.py +31 -0
- synapseclient-4.9.0/synapseclient/models/mixins/access_control.py +2397 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/mixins/asynchronous_job.py +154 -60
- synapseclient-4.9.0/synapseclient/models/mixins/json_schema.py +1262 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/mixins/storable_container.py +3 -0
- synapseclient-4.9.0/synapseclient/models/mixins/table_components.py +3973 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/project.py +17 -2
- synapseclient-4.9.0/synapseclient/models/protocols/access_control_protocol.py +446 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/agent_protocol.py +12 -12
- synapseclient-4.9.0/synapseclient/models/protocols/json_schema_protocol.py +636 -0
- synapseclient-4.9.0/synapseclient/models/protocols/table_protocol.py +107 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/services/storable_entity_components.py +22 -7
- synapseclient-4.9.0/synapseclient/models/submissionview.py +916 -0
- synapseclient-4.9.0/synapseclient/models/table.py +1530 -0
- synapseclient-4.9.0/synapseclient/models/table_components.py +695 -0
- synapseclient-4.9.0/synapseclient/models/virtualtable.py +638 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/services/json_schema.py +9 -2
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/synapsePythonClient +1 -1
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/table.py +20 -3
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/wiki.py +5 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0/synapseclient.egg-info}/PKG-INFO +80 -38
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient.egg-info/SOURCES.txt +16 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient.egg-info/requires.txt +6 -5
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/describe_functions.py +8 -9
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/monitor.py +13 -3
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/sync.py +37 -37
- synapseclient-4.7.0/synapseclient/core/upload/upload_utils.py +0 -70
- synapseclient-4.7.0/synapseclient/core/version_check.py +0 -191
- synapseclient-4.7.0/synapseclient/models/__init__.py +0 -51
- synapseclient-4.7.0/synapseclient/models/mixins/__init__.py +0 -11
- synapseclient-4.7.0/synapseclient/models/mixins/access_control.py +0 -148
- synapseclient-4.7.0/synapseclient/models/protocols/access_control_protocol.py +0 -112
- synapseclient-4.7.0/synapseclient/models/protocols/table_protocol.py +0 -134
- synapseclient-4.7.0/synapseclient/models/table.py +0 -714
- {synapseclient-4.7.0 → synapseclient-4.9.0}/MANIFEST.in +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/pyproject.toml +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/setup.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/activity.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/annotations.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/agent_services.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/annotations.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/entity_bundle_services_v2.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/api/file_services.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/cache.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/config.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/constants/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/constants/config_file_constants.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/constants/limits.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/constants/method_flags.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/credentials/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/download/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/dozer.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/lock.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/logging_setup.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/models/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/models/custom_json.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/models/dict_object.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/multithread_download/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/multithread_download/download_threads.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/pool_provider.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/retry.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/sts_transfer.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/core/upload/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/entity.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/evaluation.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/agent.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/evaluation.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/activity_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/annotations_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/file_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/folder_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/project_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/storable_container_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/team_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/protocols/user_protocol.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/services/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/services/search.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/services/storable_entity.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/team.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/user.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/models/wiki.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/services/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient/team.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient.egg-info/dependency_links.txt +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient.egg-info/entry_points.txt +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient.egg-info/not-zip-safe +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseclient.egg-info/top_level.txt +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/__init__.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/copy_functions.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/migrate_functions.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/synapseutils/walk_functions.py +0 -0
- {synapseclient-4.7.0 → synapseclient-4.9.0}/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.
|
|
3
|
+
Version: 4.9.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
|
|
@@ -9,7 +9,7 @@ License: Apache-2.0
|
|
|
9
9
|
Project-URL: Source, https://github.com/Sage-Bionetworks/synapsePythonClient
|
|
10
10
|
Project-URL: Tracker, https://github.com/Sage-Bionetworks/synapsePythonClient/issues
|
|
11
11
|
Project-URL: Documentation, https://python-docs.synapse.org
|
|
12
|
-
Project-URL: Changelog, https://python-docs.synapse.org/
|
|
12
|
+
Project-URL: Changelog, https://python-docs.synapse.org/en/stable/news/
|
|
13
13
|
Platform: any
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
21
|
Classifier: Operating System :: MacOS
|
|
21
22
|
Classifier: Operating System :: Microsoft :: Windows
|
|
22
23
|
Classifier: Operating System :: Unix
|
|
@@ -27,7 +28,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
27
28
|
Classifier: Topic :: Software Development :: Libraries
|
|
28
29
|
Classifier: Topic :: Scientific/Engineering
|
|
29
30
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
30
|
-
Requires-Python: <3.
|
|
31
|
+
Requires-Python: <3.14,>=3.9
|
|
31
32
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
32
33
|
Requires-Dist: requests<3.0,>=2.22.0
|
|
33
34
|
Requires-Dist: urllib3<2,>=1.26.18
|
|
@@ -41,15 +42,16 @@ Requires-Dist: opentelemetry-instrumentation-threading>=0.48b0
|
|
|
41
42
|
Requires-Dist: opentelemetry-instrumentation-urllib>=0.48b0
|
|
42
43
|
Requires-Dist: nest-asyncio~=1.6.0
|
|
43
44
|
Requires-Dist: asyncio-atexit~=1.0.1
|
|
44
|
-
Requires-Dist: httpx
|
|
45
|
+
Requires-Dist: httpx>=0.27.0
|
|
46
|
+
Requires-Dist: httpcore>=1.0.9
|
|
45
47
|
Requires-Dist: tqdm<5.0,>=4.66.2
|
|
46
48
|
Requires-Dist: async-lru~=2.0.4
|
|
47
49
|
Requires-Dist: psutil~=5.9.8
|
|
48
50
|
Provides-Extra: dev
|
|
49
|
-
Requires-Dist: pytest
|
|
51
|
+
Requires-Dist: pytest~=8.2.0; extra == "dev"
|
|
50
52
|
Requires-Dist: pytest-mock<4.0,>=3.0; extra == "dev"
|
|
51
53
|
Requires-Dist: pytest-socket~=0.6.0; extra == "dev"
|
|
52
|
-
Requires-Dist: pytest-asyncio<1.0,>=0.
|
|
54
|
+
Requires-Dist: pytest-asyncio<1.0,>=0.25.0; extra == "dev"
|
|
53
55
|
Requires-Dist: flake8<4.0,>=3.7.0; extra == "dev"
|
|
54
56
|
Requires-Dist: pytest-xdist[psutil]<3.0.0,>=2.2; extra == "dev"
|
|
55
57
|
Requires-Dist: pytest-rerunfailures~=12.0; extra == "dev"
|
|
@@ -59,10 +61,10 @@ Requires-Dist: black; extra == "dev"
|
|
|
59
61
|
Requires-Dist: pre-commit; extra == "dev"
|
|
60
62
|
Requires-Dist: pandas<3.0,>=1.5; extra == "dev"
|
|
61
63
|
Provides-Extra: tests
|
|
62
|
-
Requires-Dist: pytest
|
|
64
|
+
Requires-Dist: pytest~=8.2.0; extra == "tests"
|
|
63
65
|
Requires-Dist: pytest-mock<4.0,>=3.0; extra == "tests"
|
|
64
66
|
Requires-Dist: pytest-socket~=0.6.0; extra == "tests"
|
|
65
|
-
Requires-Dist: pytest-asyncio<1.0,>=0.
|
|
67
|
+
Requires-Dist: pytest-asyncio<1.0,>=0.25.0; extra == "tests"
|
|
66
68
|
Requires-Dist: flake8<4.0,>=3.7.0; extra == "tests"
|
|
67
69
|
Requires-Dist: pytest-xdist[psutil]<3.0.0,>=2.2; extra == "tests"
|
|
68
70
|
Requires-Dist: pytest-rerunfailures~=12.0; extra == "tests"
|
|
@@ -88,7 +90,7 @@ Python Synapse Client
|
|
|
88
90
|
=====================
|
|
89
91
|
|
|
90
92
|
Branch | Build Status
|
|
91
|
-
|
|
93
|
+
--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
92
94
|
develop | [](https://github.com/Sage-Bionetworks/synapsePythonClient/actions?query=branch%3Adevelop)
|
|
93
95
|
master | [](https://github.com/Sage-Bionetworks/synapsePythonClient/actions?query=branch%3Amaster)
|
|
94
96
|
|
|
@@ -122,7 +124,7 @@ or by sending an email to [python-announce+subscribe@sagebase.org](mailto:python
|
|
|
122
124
|
Installation
|
|
123
125
|
------------
|
|
124
126
|
|
|
125
|
-
The Python Synapse client has been tested on versions 3.9, 3.10, 3.11 and 3.
|
|
127
|
+
The Python Synapse client has been tested on versions 3.9, 3.10, 3.11, 3.12 and 3.13 on Mac OS X, Ubuntu Linux and Windows.
|
|
126
128
|
|
|
127
129
|
**Starting from Synapse Python client version 3.0, Synapse Python client requires Python >= 3.9**
|
|
128
130
|
|
|
@@ -359,7 +361,7 @@ The purpose of synapseutils is to create a space filled with convenience functio
|
|
|
359
361
|
|
|
360
362
|
OpenTelemetry (OTEL)
|
|
361
363
|
--------------------------------
|
|
362
|
-
[OpenTelemetry](https://opentelemetry.io/) helps support the analysis of traces and spans which can provide insights into latency, errors, and other performance metrics. The synapseclient is ready to provide traces should you want them. The Synapse Python client supports OTLP Exports and can be configured via environment variables as defined [here](https://opentelemetry
|
|
364
|
+
[OpenTelemetry](https://opentelemetry.io/) helps support the analysis of traces and spans which can provide insights into latency, errors, and other performance metrics. The synapseclient is ready to provide traces should you want them. The Synapse Python client supports OTLP Exports and can be configured via environment variables as defined [here](https://opentelemetry.io/docs/specs/otel/protocol/exporter/).
|
|
363
365
|
|
|
364
366
|
Read more about OpenTelemetry in Python [here](https://opentelemetry.io/docs/instrumentation/python/)
|
|
365
367
|
|
|
@@ -376,47 +378,87 @@ docker run --name jaeger \
|
|
|
376
378
|
jaegertracing/all-in-one:latest
|
|
377
379
|
```
|
|
378
380
|
Explanation of ports:
|
|
379
|
-
* `4318` HTTP
|
|
380
|
-
* `16686` Jaeger UI
|
|
381
|
+
* `4318` HTTP port for OTLP data collection
|
|
382
|
+
* `16686` Jaeger UI for visualizing traces
|
|
381
383
|
|
|
382
384
|
Once the docker container is running you can access the Jaeger UI via: `http://localhost:16686`
|
|
383
385
|
|
|
384
|
-
####
|
|
385
|
-
By default the OTEL exporter sends trace data to `http://localhost:4318/v1/traces`, however you may override this by setting the `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` environment variable.
|
|
386
|
+
#### Environment Variable Configuration
|
|
386
387
|
|
|
387
|
-
|
|
388
|
+
By default, the OTEL exporter sends trace data to `http://localhost:4318/v1/traces`. You can customize the behavior through environment variables:
|
|
389
|
+
|
|
390
|
+
* `OTEL_SERVICE_NAME`: Defines a unique identifier for your application or service in telemetry data (defaults to 'synapseclient'). Set this to a descriptive name that represents your specific implementation, making it easier to filter and analyze traces in your monitoring system.
|
|
391
|
+
* `OTEL_EXPORTER_OTLP_ENDPOINT`: Specifies the destination URL for sending telemetry data (defaults to 'http://localhost:4318'). Configure this to direct data to your preferred OpenTelemetry collector or monitoring service.
|
|
392
|
+
* `OTEL_DEBUG_CONSOLE`: Controls local visibility of telemetry data. Set to 'true' to output trace information to the console, which is useful for development and troubleshooting without an external collector.
|
|
393
|
+
* `OTEL_SERVICE_INSTANCE_ID`: Distinguishes between multiple instances of the same service (e.g., 'prod', 'development', 'local'). This helps identify which specific deployment or environment generated particular traces.
|
|
394
|
+
* `OTEL_EXPORTER_OTLP_HEADERS`: Configures authentication and metadata for telemetry exports. Use this to add API keys, authentication tokens, or custom metadata when sending traces to secured collectors or third-party monitoring services.
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
#### Enabling OpenTelemetry in your code
|
|
398
|
+
To enable OpenTelemetry with the Synapse Python client, simply call the
|
|
399
|
+
`enable_open_telemetry()` method on the Synapse class. Additionally you can access an
|
|
400
|
+
instance of the OpenTelemetry tracer via the `get_tracer()` call. This will allow you
|
|
401
|
+
to create new spans for your code.
|
|
402
|
+
|
|
403
|
+
```python
|
|
388
404
|
import synapseclient
|
|
389
|
-
from opentelemetry import trace
|
|
390
|
-
from opentelemetry.sdk.trace import TracerProvider
|
|
391
|
-
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
|
392
|
-
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
|
|
393
|
-
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
|
394
|
-
|
|
395
|
-
trace.set_tracer_provider(
|
|
396
|
-
TracerProvider(
|
|
397
|
-
resource=Resource(attributes={SERVICE_NAME: "my_own_code_above_synapse_client"})
|
|
398
|
-
)
|
|
399
|
-
)
|
|
400
|
-
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
|
|
401
|
-
tracer = trace.get_tracer("my_tracer")
|
|
402
|
-
synapseclient.Synapse.enable_open_telemetry(True)
|
|
403
405
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
+
# Enable OpenTelemetry with default settings
|
|
407
|
+
synapseclient.Synapse.enable_open_telemetry()
|
|
408
|
+
tracer = synapseclient.Synapse.get_tracer()
|
|
409
|
+
|
|
410
|
+
# Then create and use the Synapse client as usual
|
|
411
|
+
with tracer.start_as_current_span("my_function_span"):
|
|
406
412
|
syn = synapseclient.Synapse()
|
|
407
|
-
syn.login()
|
|
408
|
-
|
|
409
|
-
print(my_entity)
|
|
413
|
+
syn.login(authToken='auth_token')
|
|
414
|
+
```
|
|
410
415
|
|
|
411
|
-
|
|
416
|
+
#### Advanced Configuration
|
|
417
|
+
|
|
418
|
+
You can pass additional resource attributes to `enable_open_telemetry()`:
|
|
419
|
+
|
|
420
|
+
```python
|
|
421
|
+
import synapseclient
|
|
422
|
+
|
|
423
|
+
# Enable with custom resource attributes
|
|
424
|
+
synapseclient.Synapse.enable_open_telemetry(
|
|
425
|
+
resource_attributes={
|
|
426
|
+
"deployment.environment": "development",
|
|
427
|
+
"service.version": "1.2.3", # Overrides the `OTEL_SERVICE_NAME` environment variable
|
|
428
|
+
"service.instance.id": "4.5.6", # Overrides the `OTEL_SERVICE_INSTANCE_ID` environment variable
|
|
429
|
+
"custom.attribute": "value"
|
|
430
|
+
}
|
|
431
|
+
)
|
|
412
432
|
```
|
|
413
433
|
|
|
434
|
+
When OpenTelemetry is enabled in the Synapse client, the following happens automatically:
|
|
435
|
+
|
|
436
|
+
1. Instrumentation is set up for:
|
|
437
|
+
- **Threading** (via `ThreadingInstrumentor`): Ensures proper context propagation across threads, which is essential for maintaining trace continuity in multi-threaded applications
|
|
438
|
+
- **HTTP libraries**:
|
|
439
|
+
- `requests` (via `RequestsInstrumentor`): Captures all HTTP requests made using the requests library, including methods, URLs, status codes, and timing information
|
|
440
|
+
- `httpx` (via `HTTPXClientInstrumentor`): Tracks both synchronous and asynchronous HTTP requests made with the httpx library
|
|
441
|
+
- `urllib` (via `URLLibInstrumentor`): Monitors lower-level HTTP operations made directly with Python's standard library
|
|
442
|
+
- Each instrumented HTTP library includes custom hooks that extract Synapse entity IDs from URLs when possible and add them as span attributes
|
|
443
|
+
|
|
444
|
+
2. Traces are configured to collect spans across your application:
|
|
445
|
+
- Spans automatically capture operation duration, status, and errors.
|
|
446
|
+
- An attribute propagation mechanism ensures that certain attributes (like `synapse.transfer.direction` and `synapse.operation.category`) are properly passed to child spans for uploads/downloads.
|
|
447
|
+
- Trace data is exported via OTLP (OpenTelemetry Protocol).
|
|
448
|
+
|
|
449
|
+
3. Resource information is automatically added to your traces, including:
|
|
450
|
+
- Python version
|
|
451
|
+
- OS type
|
|
452
|
+
- Synapse client version
|
|
453
|
+
- Service name (defaults to "synapseclient" but can be customized via environment variables)
|
|
454
|
+
- Service instance ID
|
|
414
455
|
|
|
456
|
+
Note that once enabled, OpenTelemetry cannot be disabled in the same process - you would need to restart your Python interpreter to disable it.
|
|
415
457
|
|
|
416
458
|
|
|
417
459
|
License and Copyright
|
|
418
460
|
---------------------
|
|
419
461
|
|
|
420
|
-
© Copyright 2013-
|
|
462
|
+
© Copyright 2013-25 Sage Bionetworks
|
|
421
463
|
|
|
422
464
|
This software is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
|
|
@@ -2,7 +2,7 @@ Python Synapse Client
|
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
4
|
Branch | Build Status
|
|
5
|
-
|
|
5
|
+
--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
6
6
|
develop | [](https://github.com/Sage-Bionetworks/synapsePythonClient/actions?query=branch%3Adevelop)
|
|
7
7
|
master | [](https://github.com/Sage-Bionetworks/synapsePythonClient/actions?query=branch%3Amaster)
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ 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 versions 3.9, 3.10, 3.11 and 3.
|
|
39
|
+
The Python Synapse client has been tested on versions 3.9, 3.10, 3.11, 3.12 and 3.13 on Mac OS X, Ubuntu Linux and Windows.
|
|
40
40
|
|
|
41
41
|
**Starting from Synapse Python client version 3.0, Synapse Python client requires Python >= 3.9**
|
|
42
42
|
|
|
@@ -273,7 +273,7 @@ The purpose of synapseutils is to create a space filled with convenience functio
|
|
|
273
273
|
|
|
274
274
|
OpenTelemetry (OTEL)
|
|
275
275
|
--------------------------------
|
|
276
|
-
[OpenTelemetry](https://opentelemetry.io/) helps support the analysis of traces and spans which can provide insights into latency, errors, and other performance metrics. The synapseclient is ready to provide traces should you want them. The Synapse Python client supports OTLP Exports and can be configured via environment variables as defined [here](https://opentelemetry
|
|
276
|
+
[OpenTelemetry](https://opentelemetry.io/) helps support the analysis of traces and spans which can provide insights into latency, errors, and other performance metrics. The synapseclient is ready to provide traces should you want them. The Synapse Python client supports OTLP Exports and can be configured via environment variables as defined [here](https://opentelemetry.io/docs/specs/otel/protocol/exporter/).
|
|
277
277
|
|
|
278
278
|
Read more about OpenTelemetry in Python [here](https://opentelemetry.io/docs/instrumentation/python/)
|
|
279
279
|
|
|
@@ -290,47 +290,87 @@ docker run --name jaeger \
|
|
|
290
290
|
jaegertracing/all-in-one:latest
|
|
291
291
|
```
|
|
292
292
|
Explanation of ports:
|
|
293
|
-
* `4318` HTTP
|
|
294
|
-
* `16686` Jaeger UI
|
|
293
|
+
* `4318` HTTP port for OTLP data collection
|
|
294
|
+
* `16686` Jaeger UI for visualizing traces
|
|
295
295
|
|
|
296
296
|
Once the docker container is running you can access the Jaeger UI via: `http://localhost:16686`
|
|
297
297
|
|
|
298
|
-
####
|
|
299
|
-
By default the OTEL exporter sends trace data to `http://localhost:4318/v1/traces`, however you may override this by setting the `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` environment variable.
|
|
298
|
+
#### Environment Variable Configuration
|
|
300
299
|
|
|
301
|
-
|
|
300
|
+
By default, the OTEL exporter sends trace data to `http://localhost:4318/v1/traces`. You can customize the behavior through environment variables:
|
|
301
|
+
|
|
302
|
+
* `OTEL_SERVICE_NAME`: Defines a unique identifier for your application or service in telemetry data (defaults to 'synapseclient'). Set this to a descriptive name that represents your specific implementation, making it easier to filter and analyze traces in your monitoring system.
|
|
303
|
+
* `OTEL_EXPORTER_OTLP_ENDPOINT`: Specifies the destination URL for sending telemetry data (defaults to 'http://localhost:4318'). Configure this to direct data to your preferred OpenTelemetry collector or monitoring service.
|
|
304
|
+
* `OTEL_DEBUG_CONSOLE`: Controls local visibility of telemetry data. Set to 'true' to output trace information to the console, which is useful for development and troubleshooting without an external collector.
|
|
305
|
+
* `OTEL_SERVICE_INSTANCE_ID`: Distinguishes between multiple instances of the same service (e.g., 'prod', 'development', 'local'). This helps identify which specific deployment or environment generated particular traces.
|
|
306
|
+
* `OTEL_EXPORTER_OTLP_HEADERS`: Configures authentication and metadata for telemetry exports. Use this to add API keys, authentication tokens, or custom metadata when sending traces to secured collectors or third-party monitoring services.
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
#### Enabling OpenTelemetry in your code
|
|
310
|
+
To enable OpenTelemetry with the Synapse Python client, simply call the
|
|
311
|
+
`enable_open_telemetry()` method on the Synapse class. Additionally you can access an
|
|
312
|
+
instance of the OpenTelemetry tracer via the `get_tracer()` call. This will allow you
|
|
313
|
+
to create new spans for your code.
|
|
314
|
+
|
|
315
|
+
```python
|
|
302
316
|
import synapseclient
|
|
303
|
-
from opentelemetry import trace
|
|
304
|
-
from opentelemetry.sdk.trace import TracerProvider
|
|
305
|
-
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
|
306
|
-
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
|
|
307
|
-
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
|
308
|
-
|
|
309
|
-
trace.set_tracer_provider(
|
|
310
|
-
TracerProvider(
|
|
311
|
-
resource=Resource(attributes={SERVICE_NAME: "my_own_code_above_synapse_client"})
|
|
312
|
-
)
|
|
313
|
-
)
|
|
314
|
-
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
|
|
315
|
-
tracer = trace.get_tracer("my_tracer")
|
|
316
|
-
synapseclient.Synapse.enable_open_telemetry(True)
|
|
317
317
|
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
# Enable OpenTelemetry with default settings
|
|
319
|
+
synapseclient.Synapse.enable_open_telemetry()
|
|
320
|
+
tracer = synapseclient.Synapse.get_tracer()
|
|
321
|
+
|
|
322
|
+
# Then create and use the Synapse client as usual
|
|
323
|
+
with tracer.start_as_current_span("my_function_span"):
|
|
320
324
|
syn = synapseclient.Synapse()
|
|
321
|
-
syn.login()
|
|
322
|
-
|
|
323
|
-
print(my_entity)
|
|
325
|
+
syn.login(authToken='auth_token')
|
|
326
|
+
```
|
|
324
327
|
|
|
325
|
-
|
|
328
|
+
#### Advanced Configuration
|
|
329
|
+
|
|
330
|
+
You can pass additional resource attributes to `enable_open_telemetry()`:
|
|
331
|
+
|
|
332
|
+
```python
|
|
333
|
+
import synapseclient
|
|
334
|
+
|
|
335
|
+
# Enable with custom resource attributes
|
|
336
|
+
synapseclient.Synapse.enable_open_telemetry(
|
|
337
|
+
resource_attributes={
|
|
338
|
+
"deployment.environment": "development",
|
|
339
|
+
"service.version": "1.2.3", # Overrides the `OTEL_SERVICE_NAME` environment variable
|
|
340
|
+
"service.instance.id": "4.5.6", # Overrides the `OTEL_SERVICE_INSTANCE_ID` environment variable
|
|
341
|
+
"custom.attribute": "value"
|
|
342
|
+
}
|
|
343
|
+
)
|
|
326
344
|
```
|
|
327
345
|
|
|
346
|
+
When OpenTelemetry is enabled in the Synapse client, the following happens automatically:
|
|
347
|
+
|
|
348
|
+
1. Instrumentation is set up for:
|
|
349
|
+
- **Threading** (via `ThreadingInstrumentor`): Ensures proper context propagation across threads, which is essential for maintaining trace continuity in multi-threaded applications
|
|
350
|
+
- **HTTP libraries**:
|
|
351
|
+
- `requests` (via `RequestsInstrumentor`): Captures all HTTP requests made using the requests library, including methods, URLs, status codes, and timing information
|
|
352
|
+
- `httpx` (via `HTTPXClientInstrumentor`): Tracks both synchronous and asynchronous HTTP requests made with the httpx library
|
|
353
|
+
- `urllib` (via `URLLibInstrumentor`): Monitors lower-level HTTP operations made directly with Python's standard library
|
|
354
|
+
- Each instrumented HTTP library includes custom hooks that extract Synapse entity IDs from URLs when possible and add them as span attributes
|
|
355
|
+
|
|
356
|
+
2. Traces are configured to collect spans across your application:
|
|
357
|
+
- Spans automatically capture operation duration, status, and errors.
|
|
358
|
+
- An attribute propagation mechanism ensures that certain attributes (like `synapse.transfer.direction` and `synapse.operation.category`) are properly passed to child spans for uploads/downloads.
|
|
359
|
+
- Trace data is exported via OTLP (OpenTelemetry Protocol).
|
|
360
|
+
|
|
361
|
+
3. Resource information is automatically added to your traces, including:
|
|
362
|
+
- Python version
|
|
363
|
+
- OS type
|
|
364
|
+
- Synapse client version
|
|
365
|
+
- Service name (defaults to "synapseclient" but can be customized via environment variables)
|
|
366
|
+
- Service instance ID
|
|
328
367
|
|
|
368
|
+
Note that once enabled, OpenTelemetry cannot be disabled in the same process - you would need to restart your Python interpreter to disable it.
|
|
329
369
|
|
|
330
370
|
|
|
331
371
|
License and Copyright
|
|
332
372
|
---------------------
|
|
333
373
|
|
|
334
|
-
© Copyright 2013-
|
|
374
|
+
© Copyright 2013-25 Sage Bionetworks
|
|
335
375
|
|
|
336
376
|
This software is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
|
|
@@ -12,7 +12,7 @@ project_urls =
|
|
|
12
12
|
Source = https://github.com/Sage-Bionetworks/synapsePythonClient
|
|
13
13
|
Tracker = https://github.com/Sage-Bionetworks/synapsePythonClient/issues
|
|
14
14
|
Documentation = https://python-docs.synapse.org
|
|
15
|
-
Changelog = https://python-docs.synapse.org/
|
|
15
|
+
Changelog = https://python-docs.synapse.org/en/stable/news/
|
|
16
16
|
platforms = any
|
|
17
17
|
classifiers =
|
|
18
18
|
Development Status :: 5 - Production/Stable
|
|
@@ -21,6 +21,7 @@ classifiers =
|
|
|
21
21
|
Programming Language :: Python :: 3.10
|
|
22
22
|
Programming Language :: Python :: 3.11
|
|
23
23
|
Programming Language :: Python :: 3.12
|
|
24
|
+
Programming Language :: Python :: 3.13
|
|
24
25
|
Operating System :: MacOS
|
|
25
26
|
Operating System :: Microsoft :: Windows
|
|
26
27
|
Operating System :: Unix
|
|
@@ -36,7 +37,7 @@ classifiers =
|
|
|
36
37
|
zip_safe = False
|
|
37
38
|
include_package_data = True
|
|
38
39
|
packages = find:
|
|
39
|
-
python_requires = >=3.9, <3.
|
|
40
|
+
python_requires = >=3.9, <3.14
|
|
40
41
|
install_requires =
|
|
41
42
|
requests>=2.22.0,<3.0
|
|
42
43
|
urllib3>=1.26.18,<2
|
|
@@ -50,15 +51,16 @@ install_requires =
|
|
|
50
51
|
opentelemetry-instrumentation-urllib>=0.48b0
|
|
51
52
|
nest-asyncio~=1.6.0
|
|
52
53
|
asyncio-atexit~=1.0.1
|
|
53
|
-
httpx
|
|
54
|
+
httpx>=0.27.0
|
|
55
|
+
httpcore>=1.0.9
|
|
54
56
|
tqdm>=4.66.2,<5.0
|
|
55
57
|
async-lru~=2.0.4
|
|
56
58
|
psutil~=5.9.8
|
|
57
59
|
tests_require =
|
|
58
|
-
pytest
|
|
60
|
+
pytest~=8.2.0
|
|
59
61
|
pytest-mock>=3.0,<4.0
|
|
60
62
|
pytest-socket~=0.6.0
|
|
61
|
-
pytest-asyncio>=0.
|
|
63
|
+
pytest-asyncio>=0.25.0,<1.0
|
|
62
64
|
flake8>=3.7.0,<4.0
|
|
63
65
|
pytest-xdist[psutil]>=2.2,<3.0.0
|
|
64
66
|
pytest-rerunfailures~=12.0
|
|
@@ -68,10 +70,10 @@ tests_require =
|
|
|
68
70
|
|
|
69
71
|
[options.extras_require]
|
|
70
72
|
dev =
|
|
71
|
-
pytest
|
|
73
|
+
pytest~=8.2.0
|
|
72
74
|
pytest-mock>=3.0,<4.0
|
|
73
75
|
pytest-socket~=0.6.0
|
|
74
|
-
pytest-asyncio>=0.
|
|
76
|
+
pytest-asyncio>=0.25.0,<1.0
|
|
75
77
|
flake8>=3.7.0,<4.0
|
|
76
78
|
pytest-xdist[psutil]>=2.2,<3.0.0
|
|
77
79
|
pytest-rerunfailures~=12.0
|
|
@@ -81,10 +83,10 @@ dev =
|
|
|
81
83
|
pre-commit
|
|
82
84
|
pandas>=1.5,<3.0
|
|
83
85
|
tests =
|
|
84
|
-
pytest
|
|
86
|
+
pytest~=8.2.0
|
|
85
87
|
pytest-mock>=3.0,<4.0
|
|
86
88
|
pytest-socket~=0.6.0
|
|
87
|
-
pytest-asyncio>=0.
|
|
89
|
+
pytest-asyncio>=0.25.0,<1.0
|
|
88
90
|
flake8>=3.7.0,<4.0
|
|
89
91
|
pytest-xdist[psutil]>=2.2,<3.0.0
|
|
90
92
|
pytest-rerunfailures~=12.0
|
|
@@ -4,10 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
## Used for logging in to Synapse. See https://python-docs.synapse.org/tutorials/authentication/
|
|
6
6
|
## for information on retrieving an auth token.
|
|
7
|
-
#[authentication]
|
|
8
|
-
#username = <username>
|
|
9
|
-
#authtoken = <authtoken>
|
|
10
7
|
|
|
8
|
+
#[default]
|
|
9
|
+
#username = default_user
|
|
10
|
+
#authtoken = default_auth_token
|
|
11
|
+
|
|
12
|
+
#[profile user1]
|
|
13
|
+
#username = user1
|
|
14
|
+
#authtoken = user1_auth_token
|
|
15
|
+
|
|
16
|
+
#[profile user2]
|
|
17
|
+
#username = user2
|
|
18
|
+
#authtoken = user2_auth_token
|
|
11
19
|
|
|
12
20
|
## If you have projects with file stored on SFTP servers, you can specify your credentials here
|
|
13
21
|
## You can specify multiple sftp credentials
|