diaspora-event-sdk 0.1.6__tar.gz → 0.2.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.
- {diaspora-event-sdk-0.1.6/diaspora_event_sdk.egg-info → diaspora-event-sdk-0.2.0}/PKG-INFO +4 -11
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/_environments.py +1 -1
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/client.py +29 -46
- diaspora-event-sdk-0.2.0/diaspora_event_sdk/sdk/web_client.py +99 -0
- diaspora-event-sdk-0.2.0/diaspora_event_sdk/version.py +1 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0/diaspora_event_sdk.egg-info}/PKG-INFO +4 -11
- diaspora-event-sdk-0.1.6/diaspora_event_sdk/sdk/web_client.py +0 -127
- diaspora-event-sdk-0.1.6/diaspora_event_sdk/version.py +0 -1
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/LICENSE +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/MANIFEST.in +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/README.md +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/__init__.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/__init__.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/decorators.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/kafka_client.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/__init__.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/client_login.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/decorators.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/globus_auth.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/login_flow.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/manager.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/protocol.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/login_manager/tokenstore.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/utils/__init__.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/utils/uuid_like.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/SOURCES.txt +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/dependency_links.txt +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/requires.txt +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/top_level.txt +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/setup.cfg +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/setup.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/tests/__init__.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/tests/unit/test_client.py +0 -0
- {diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/tox.ini +0 -0
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: diaspora-event-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: SDK of Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge
|
|
5
5
|
Home-page: https://github.com/globus-labs/diaspora-event-sdk
|
|
6
6
|
License: LICENSE
|
|
7
|
+
Platform: UNKNOWN
|
|
7
8
|
Description-Content-Type: text/markdown
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Requires-Dist: globus-sdk<4,>=3.20.1
|
|
10
9
|
Provides-Extra: kafka-python
|
|
11
|
-
Requires-Dist: kafka-python; extra == "kafka-python"
|
|
12
|
-
Requires-Dist: aws-msk-iam-sasl-signer-python; extra == "kafka-python"
|
|
13
10
|
Provides-Extra: test
|
|
14
|
-
|
|
15
|
-
Requires-Dist: pytest-cov; extra == "test"
|
|
16
|
-
Requires-Dist: coverage; extra == "test"
|
|
17
|
-
Requires-Dist: mypy; extra == "test"
|
|
18
|
-
Requires-Dist: tox; extra == "test"
|
|
19
|
-
Requires-Dist: check-manifest; extra == "test"
|
|
11
|
+
License-File: LICENSE
|
|
20
12
|
|
|
21
13
|
# Diaspora: Resilience-enabling services for science from HPC to edge
|
|
22
14
|
|
|
@@ -47,3 +39,4 @@ Note: This method does not include dependencies for `KafkaProducer` and `KafkaCo
|
|
|
47
39
|
**Advanced Consumers with Faust**: Explore the [Faust Streaming Guide](docs/faust_weather_app.md) for advanced event streaming with Faust.
|
|
48
40
|
|
|
49
41
|
**Advanced Consumer Functions**: See our [Colab example](https://colab.research.google.com/drive/1tPKfxU2qPsLvNTreF6nKINU62k7pQWxa?usp=sharing) for demonstration.
|
|
42
|
+
|
|
@@ -89,16 +89,6 @@ class Client:
|
|
|
89
89
|
"endpoint": tokens["endpoint"],
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
# @requires_login # TODO
|
|
93
|
-
# def get_secret_key(self):
|
|
94
|
-
# tokens = self.login_manager._token_storage.get_token_data(
|
|
95
|
-
# DIASPORA_RESOURCE_SERVER
|
|
96
|
-
# )
|
|
97
|
-
# if tokens is None or "secret_key" not in tokens:
|
|
98
|
-
# return None
|
|
99
|
-
# else:
|
|
100
|
-
# return tokens["secret_key"]
|
|
101
|
-
|
|
102
92
|
@requires_login
|
|
103
93
|
def put_secret_key(self, access_key, secret_key, endpoint):
|
|
104
94
|
tokens = self.login_manager._token_storage.get_token_data(
|
|
@@ -133,81 +123,74 @@ class Client:
|
|
|
133
123
|
"""
|
|
134
124
|
Registers a new topic under the user's OpenID.
|
|
135
125
|
"""
|
|
136
|
-
return self.web_client.register_topic(self.subject_openid, topic)
|
|
126
|
+
return self.web_client.register_topic(self.subject_openid, topic, "register")
|
|
137
127
|
|
|
138
128
|
@requires_login
|
|
139
129
|
def unregister_topic(self, topic):
|
|
140
130
|
"""
|
|
141
131
|
Unregisters a topic from the user's OpenID.
|
|
142
132
|
"""
|
|
143
|
-
return self.web_client.
|
|
144
|
-
|
|
145
|
-
@requires_login
|
|
146
|
-
def register_topic_for_user(self, topic, user):
|
|
147
|
-
"""
|
|
148
|
-
Registers a new topic under the user's OpenID.
|
|
149
|
-
"""
|
|
150
|
-
return self.web_client.register_topic_for_user(self.subject_openid, topic, user)
|
|
133
|
+
return self.web_client.register_topic(self.subject_openid, topic, "unregister")
|
|
151
134
|
|
|
152
135
|
@requires_login
|
|
153
|
-
def
|
|
136
|
+
def get_topic_configs(self, topic):
|
|
154
137
|
"""
|
|
155
|
-
|
|
138
|
+
Get topic configurations.
|
|
156
139
|
"""
|
|
157
|
-
return self.web_client.
|
|
140
|
+
return self.web_client.get_topic_configs(self.subject_openid, topic)
|
|
158
141
|
|
|
159
142
|
@requires_login
|
|
160
|
-
def
|
|
143
|
+
def update_topic_configs(self, topic, configs):
|
|
161
144
|
"""
|
|
162
|
-
|
|
145
|
+
Set topic configurations.
|
|
163
146
|
"""
|
|
164
|
-
return self.web_client.
|
|
147
|
+
return self.web_client.update_topic_configs(self.subject_openid, topic, configs)
|
|
165
148
|
|
|
166
149
|
@requires_login
|
|
167
|
-
def
|
|
150
|
+
def update_topic_partitions(self, topic, new_partitions):
|
|
168
151
|
"""
|
|
169
|
-
|
|
152
|
+
Adjust topic number of partitions
|
|
170
153
|
"""
|
|
171
|
-
return self.web_client.
|
|
154
|
+
return self.web_client.update_topic_partitions(self.subject_openid, topic, new_partitions)
|
|
172
155
|
|
|
173
156
|
@requires_login
|
|
174
|
-
def
|
|
157
|
+
def grant_user_access(self, topic, user):
|
|
175
158
|
"""
|
|
176
|
-
|
|
159
|
+
Registers a new topic under the user's OpenID.
|
|
177
160
|
"""
|
|
178
|
-
return self.web_client.
|
|
161
|
+
return self.web_client.grant_user_access(self.subject_openid, topic, user, "grant")
|
|
179
162
|
|
|
180
163
|
@requires_login
|
|
181
|
-
def
|
|
164
|
+
def revoke_user_access(self, topic, user):
|
|
182
165
|
"""
|
|
183
|
-
|
|
166
|
+
Unregisters a topic from the user's OpenID.
|
|
184
167
|
"""
|
|
185
|
-
return self.web_client.
|
|
168
|
+
return self.web_client.grant_user_access(self.subject_openid, topic, user, "revoke")
|
|
186
169
|
|
|
187
170
|
@requires_login
|
|
188
|
-
def
|
|
171
|
+
def list_triggers(self):
|
|
189
172
|
"""
|
|
190
|
-
|
|
173
|
+
Retrieves the list of functions associated with the user's OpenID.
|
|
191
174
|
"""
|
|
192
|
-
return self.web_client.
|
|
175
|
+
return self.web_client.list_triggers(self.subject_openid)
|
|
193
176
|
|
|
194
177
|
@requires_login
|
|
195
|
-
def
|
|
178
|
+
def create_trigger(self, topic, function, function_configs):
|
|
196
179
|
"""
|
|
197
|
-
|
|
180
|
+
Registers a new functions under the user's OpenID.
|
|
198
181
|
"""
|
|
199
|
-
return self.web_client.
|
|
182
|
+
return self.web_client.create_trigger(self.subject_openid, topic, function, "create", function_configs)
|
|
200
183
|
|
|
201
184
|
@requires_login
|
|
202
|
-
def
|
|
185
|
+
def delete_trigger(self, topic, function):
|
|
203
186
|
"""
|
|
204
|
-
|
|
187
|
+
Unregisters a functions from the user's OpenID.
|
|
205
188
|
"""
|
|
206
|
-
return self.web_client.
|
|
189
|
+
return self.web_client.create_trigger(self.subject_openid, topic, function, "delete", {})
|
|
207
190
|
|
|
208
191
|
@requires_login
|
|
209
|
-
def
|
|
192
|
+
def update_trigger(self, trigger_uuid, trigger_configs):
|
|
210
193
|
"""
|
|
211
|
-
|
|
194
|
+
Update a functions's trigger'.
|
|
212
195
|
"""
|
|
213
|
-
return self.web_client.
|
|
196
|
+
return self.web_client.update_trigger(self.subject_openid, trigger_uuid, trigger_configs)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
import json
|
|
3
|
+
import globus_sdk
|
|
4
|
+
from diaspora_event_sdk.sdk.utils.uuid_like import UUID_LIKE_T
|
|
5
|
+
|
|
6
|
+
from ._environments import TOKEN_EXCHANGE
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WebClient(globus_sdk.BaseClient):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
*,
|
|
13
|
+
environment: Optional[str] = None,
|
|
14
|
+
base_url: Optional[str] = None,
|
|
15
|
+
app_name: Optional[str] = None,
|
|
16
|
+
**kwargs,
|
|
17
|
+
):
|
|
18
|
+
if base_url is None:
|
|
19
|
+
base_url = TOKEN_EXCHANGE
|
|
20
|
+
|
|
21
|
+
super().__init__(environment=environment, base_url=base_url, **kwargs)
|
|
22
|
+
|
|
23
|
+
self._user_app_name = None
|
|
24
|
+
self.user_app_name = app_name
|
|
25
|
+
|
|
26
|
+
def create_key(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
|
|
27
|
+
return self.get("/api/v2/create_key", headers={"Subject": str(subject)})
|
|
28
|
+
|
|
29
|
+
def list_topics(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
|
|
30
|
+
return self.get("/api/v2/topics", headers={"Subject": str(subject)})
|
|
31
|
+
|
|
32
|
+
def register_topic(
|
|
33
|
+
self, subject: UUID_LIKE_T, topic: str, action: str
|
|
34
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
35
|
+
return self.put(
|
|
36
|
+
f"/api/v2/topic/{topic}", headers={"Subject": str(subject), "Action": action}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def get_topic_configs(
|
|
40
|
+
self, subject: UUID_LIKE_T, topic: str
|
|
41
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
42
|
+
return self.get(
|
|
43
|
+
f"/api/v2/topic/{topic}",
|
|
44
|
+
headers={"Subject": str(subject), "Topic": topic},
|
|
45
|
+
# data=json.dumps(configs).encode("utf-8")
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def update_topic_configs(
|
|
49
|
+
self, subject: UUID_LIKE_T, topic: str, configs: dict
|
|
50
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
51
|
+
return self.post(
|
|
52
|
+
f"/api/v2/topic/{topic}",
|
|
53
|
+
headers={"Subject": str(subject), "Topic": topic,
|
|
54
|
+
"Content-Type": "text/plain"},
|
|
55
|
+
data=json.dumps(configs).encode("utf-8")
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
def update_topic_partitions(
|
|
59
|
+
self, subject: UUID_LIKE_T, topic: str, new_partitions: int
|
|
60
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
61
|
+
return self.post(
|
|
62
|
+
f"/api/v2/topic/{topic}/partitions",
|
|
63
|
+
headers={"Subject": str(subject), "Topic": topic,
|
|
64
|
+
"NewPartitions": str(new_partitions)},
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
def grant_user_access(
|
|
68
|
+
self, subject: UUID_LIKE_T, topic: str, user: UUID_LIKE_T, action: str
|
|
69
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
70
|
+
return self.post(
|
|
71
|
+
f"/api/v2/topic/{topic}/user",
|
|
72
|
+
headers={"Subject": str(subject), "Action": action,
|
|
73
|
+
"Topic": topic, "User": str(user)}
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
def list_triggers(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
|
|
77
|
+
return self.get("/api/v2/triggers", headers={"Subject": str(subject)})
|
|
78
|
+
|
|
79
|
+
def create_trigger(
|
|
80
|
+
self, subject: UUID_LIKE_T, topic: str, function: str, action: str,
|
|
81
|
+
function_configs: dict
|
|
82
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
83
|
+
return self.put(
|
|
84
|
+
"/api/v2/trigger",
|
|
85
|
+
headers={"Subject": str(subject), "Topic": topic,
|
|
86
|
+
"Trigger": function, "Action": action,
|
|
87
|
+
"Content-Type": "text/plain"},
|
|
88
|
+
data=json.dumps(function_configs).encode("utf-8")
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def update_trigger(
|
|
92
|
+
self, subject: UUID_LIKE_T, trigger_uuid: UUID_LIKE_T, trigger_configs: dict
|
|
93
|
+
) -> globus_sdk.GlobusHTTPResponse:
|
|
94
|
+
return self.post(
|
|
95
|
+
f"/api/v2/triggers/{trigger_uuid}",
|
|
96
|
+
headers={"Subject": str(subject), "Trigger_id": str(trigger_uuid),
|
|
97
|
+
"Content-Type": "text/plain"},
|
|
98
|
+
data=json.dumps(trigger_configs).encode("utf-8")
|
|
99
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.0"
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: diaspora-event-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: SDK of Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge
|
|
5
5
|
Home-page: https://github.com/globus-labs/diaspora-event-sdk
|
|
6
6
|
License: LICENSE
|
|
7
|
+
Platform: UNKNOWN
|
|
7
8
|
Description-Content-Type: text/markdown
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Requires-Dist: globus-sdk<4,>=3.20.1
|
|
10
9
|
Provides-Extra: kafka-python
|
|
11
|
-
Requires-Dist: kafka-python; extra == "kafka-python"
|
|
12
|
-
Requires-Dist: aws-msk-iam-sasl-signer-python; extra == "kafka-python"
|
|
13
10
|
Provides-Extra: test
|
|
14
|
-
|
|
15
|
-
Requires-Dist: pytest-cov; extra == "test"
|
|
16
|
-
Requires-Dist: coverage; extra == "test"
|
|
17
|
-
Requires-Dist: mypy; extra == "test"
|
|
18
|
-
Requires-Dist: tox; extra == "test"
|
|
19
|
-
Requires-Dist: check-manifest; extra == "test"
|
|
11
|
+
License-File: LICENSE
|
|
20
12
|
|
|
21
13
|
# Diaspora: Resilience-enabling services for science from HPC to edge
|
|
22
14
|
|
|
@@ -47,3 +39,4 @@ Note: This method does not include dependencies for `KafkaProducer` and `KafkaCo
|
|
|
47
39
|
**Advanced Consumers with Faust**: Explore the [Faust Streaming Guide](docs/faust_weather_app.md) for advanced event streaming with Faust.
|
|
48
40
|
|
|
49
41
|
**Advanced Consumer Functions**: See our [Colab example](https://colab.research.google.com/drive/1tPKfxU2qPsLvNTreF6nKINU62k7pQWxa?usp=sharing) for demonstration.
|
|
42
|
+
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
|
|
3
|
-
import globus_sdk
|
|
4
|
-
from diaspora_event_sdk.sdk.utils.uuid_like import UUID_LIKE_T
|
|
5
|
-
|
|
6
|
-
from ._environments import TOKEN_EXCHANGE
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class WebClient(globus_sdk.BaseClient):
|
|
10
|
-
def __init__(
|
|
11
|
-
self,
|
|
12
|
-
*,
|
|
13
|
-
environment: Optional[str] = None,
|
|
14
|
-
base_url: Optional[str] = None,
|
|
15
|
-
app_name: Optional[str] = None,
|
|
16
|
-
**kwargs,
|
|
17
|
-
):
|
|
18
|
-
if base_url is None:
|
|
19
|
-
base_url = TOKEN_EXCHANGE
|
|
20
|
-
|
|
21
|
-
super().__init__(environment=environment, base_url=base_url, **kwargs)
|
|
22
|
-
|
|
23
|
-
self._user_app_name = None
|
|
24
|
-
self.user_app_name = app_name
|
|
25
|
-
|
|
26
|
-
def create_key(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
|
|
27
|
-
return self.post("/v1/create_key", headers={"Subject": str(subject)})
|
|
28
|
-
|
|
29
|
-
def list_topics(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
|
|
30
|
-
return self.get("/v1/list_topics", headers={"Subject": str(subject)})
|
|
31
|
-
|
|
32
|
-
def register_topic(
|
|
33
|
-
self, subject: UUID_LIKE_T, topic: str
|
|
34
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
35
|
-
return self.post(
|
|
36
|
-
"/v1/register_topic", headers={"Subject": str(subject), "Topic": topic}
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
def unregister_topic(
|
|
40
|
-
self, subject: UUID_LIKE_T, topic: str
|
|
41
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
42
|
-
return self.post(
|
|
43
|
-
"/v1/unregister_topic", headers={"Subject": str(subject), "Topic": topic}
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
def register_topic_for_user(
|
|
47
|
-
self, subject: UUID_LIKE_T, topic: str, user: UUID_LIKE_T
|
|
48
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
49
|
-
return self.post(
|
|
50
|
-
"/v1/register_topic_for_user",
|
|
51
|
-
headers={"Subject": str(
|
|
52
|
-
subject), "Topic": topic, "User": str(user)}
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
def unregister_topic_for_user(
|
|
56
|
-
self, subject: UUID_LIKE_T, topic: str, user: UUID_LIKE_T
|
|
57
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
58
|
-
return self.post(
|
|
59
|
-
"/v1/unregister_topic_for_user",
|
|
60
|
-
headers={"Subject": str(
|
|
61
|
-
subject), "Topic": topic, "User": str(user)}
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
def list_functions(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
|
|
65
|
-
return self.get("/v1/list_functions", headers={"Subject": str(subject)})
|
|
66
|
-
|
|
67
|
-
def register_function(
|
|
68
|
-
self, subject: UUID_LIKE_T, topic: str, function: str,
|
|
69
|
-
function_configs: dict
|
|
70
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
71
|
-
return self.post(
|
|
72
|
-
"/v1/register_function",
|
|
73
|
-
headers={"Subject": str(subject), "Topic": topic,
|
|
74
|
-
"Function": function},
|
|
75
|
-
data=function_configs
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
def unregister_function(
|
|
79
|
-
self, subject: UUID_LIKE_T, topic: str, function: str
|
|
80
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
81
|
-
return self.post(
|
|
82
|
-
"/v1/unregister_function", headers={"Subject": str(subject), "Topic": topic, "Function": function}
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
def update_function_trigger(
|
|
86
|
-
self, subject: UUID_LIKE_T, trigger_uuid: UUID_LIKE_T, trigger_configs: dict
|
|
87
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
88
|
-
return self.post(
|
|
89
|
-
"/v1/update_function_trigger",
|
|
90
|
-
headers={"Subject": str(subject), "Trigger": str(trigger_uuid)},
|
|
91
|
-
data=trigger_configs
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
def get_identities(
|
|
95
|
-
self, subject: UUID_LIKE_T
|
|
96
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
97
|
-
return self.post(
|
|
98
|
-
"/v1/get_identities",
|
|
99
|
-
headers={"Subject": str(subject)}
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
def get_topic_configs(
|
|
103
|
-
self, subject: UUID_LIKE_T, topic: str, configs: dict
|
|
104
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
105
|
-
return self.post(
|
|
106
|
-
"/v1/get_topic_configs",
|
|
107
|
-
headers={"Subject": str(subject), "Topic": topic},
|
|
108
|
-
data=configs
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
def set_topic_configs(
|
|
112
|
-
self, subject: UUID_LIKE_T, topic: str, configs: dict
|
|
113
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
114
|
-
return self.post(
|
|
115
|
-
"/v1/set_topic_configs",
|
|
116
|
-
headers={"Subject": str(subject), "Topic": topic},
|
|
117
|
-
data=configs
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
def create_partitions(
|
|
121
|
-
self, subject: UUID_LIKE_T, topic: str, new_partitions: int
|
|
122
|
-
) -> globus_sdk.GlobusHTTPResponse:
|
|
123
|
-
return self.post(
|
|
124
|
-
"/v1/create_partitions",
|
|
125
|
-
headers={"Subject": str(subject), "Topic": topic,
|
|
126
|
-
"NewPartitions": str(new_partitions)},
|
|
127
|
-
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/kafka_client.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
|
{diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/utils/__init__.py
RENAMED
|
File without changes
|
{diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk/sdk/utils/uuid_like.py
RENAMED
|
File without changes
|
{diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/requires.txt
RENAMED
|
File without changes
|
{diaspora-event-sdk-0.1.6 → diaspora-event-sdk-0.2.0}/diaspora_event_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|