diaspora-event-sdk 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl

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.
@@ -153,6 +153,13 @@ class Client:
153
153
  """
154
154
  return self.web_client.update_topic_partitions(self.subject_openid, topic, new_partitions)
155
155
 
156
+ @requires_login
157
+ def reset_topic(self, topic):
158
+ """
159
+ Deletes and recreates the topic, removing all messages and restoring the topic to the default configurations while user access is not affected.
160
+ """
161
+ return self.web_client.reset_topic(self.subject_openid, topic)
162
+
156
163
  @requires_login
157
164
  def grant_user_access(self, topic, user):
158
165
  """
@@ -167,6 +174,13 @@ class Client:
167
174
  """
168
175
  return self.web_client.grant_user_access(self.subject_openid, topic, user, "revoke")
169
176
 
177
+ @requires_login
178
+ def list_topic_users(self, topic):
179
+ """
180
+ Returns a list of users that have access to the topic.
181
+ """
182
+ return self.web_client.list_topic_users(self.subject_openid, topic)
183
+
170
184
  @requires_login
171
185
  def list_triggers(self):
172
186
  """
@@ -66,6 +66,15 @@ class WebClient(globus_sdk.BaseClient):
66
66
  "NewPartitions": str(new_partitions)}
67
67
  )
68
68
 
69
+ def reset_topic(
70
+ self, subject: UUID_LIKE_T, topic: str
71
+ ) -> globus_sdk.GlobusHTTPResponse:
72
+ return self.post(
73
+ f"/api/v2/topic/{topic}/reset",
74
+ headers={"Subject": str(subject),
75
+ "Topic": topic}
76
+ )
77
+
69
78
  def grant_user_access(
70
79
  self, subject: UUID_LIKE_T, topic: str, user: UUID_LIKE_T, action: str
71
80
  ) -> globus_sdk.GlobusHTTPResponse:
@@ -75,6 +84,15 @@ class WebClient(globus_sdk.BaseClient):
75
84
  "Topic": topic, "User": str(user)}
76
85
  )
77
86
 
87
+ def list_topic_users(
88
+ self, subject: UUID_LIKE_T, topic: str
89
+ ) -> globus_sdk.GlobusHTTPResponse:
90
+ return self.get(
91
+ f"/api/v2/topic/{topic}/users",
92
+ headers={"Subject": str(subject),
93
+ "Topic": topic}
94
+ )
95
+
78
96
  def list_triggers(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
79
97
  return self.get("/api/v2/triggers", headers={"Subject": str(subject)})
80
98
 
@@ -1 +1 @@
1
- __version__ = "0.2.4"
1
+ __version__ = "0.2.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diaspora-event-sdk
3
- Version: 0.2.4
3
+ Version: 0.2.5
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
@@ -19,7 +19,7 @@ Requires-Dist: mypy ; extra == 'test'
19
19
  Requires-Dist: tox ; extra == 'test'
20
20
  Requires-Dist: check-manifest ; extra == 'test'
21
21
 
22
- # Diaspora: Resilience-enabling services for science from HPC to edge
22
+ # Diaspora: Hybrid Event-Driven Architecture for Distributed Scientific Computing
23
23
 
24
24
  ## Event Fabric SDK Installation Guide
25
25
  ### Recommended Method: Use with `kafka-python`
@@ -49,3 +49,4 @@ Note: This method does not include dependencies for `KafkaProducer` and `KafkaCo
49
49
 
50
50
  **Advanced Consumer Functions**: See our [Colab example](https://colab.research.google.com/drive/1tPKfxU2qPsLvNTreF6nKINU62k7pQWxa?usp=sharing) for demonstration.
51
51
 
52
+
@@ -1,11 +1,11 @@
1
1
  diaspora_event_sdk/__init__.py,sha256=v8IN3-WFpliakQKru8TAcmQ4IRdvRe_m9-abSDnGIFM,457
2
- diaspora_event_sdk/version.py,sha256=SBl2EPFW-ltPvQ7vbVWItyAsz3aKYIpjO7vcfr84GkU,22
2
+ diaspora_event_sdk/version.py,sha256=Xsa3ayOMVkhUWm4t06YeyHE0apjpZefxLH4ylp0CDtU,22
3
3
  diaspora_event_sdk/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  diaspora_event_sdk/sdk/_environments.py,sha256=QyQA7dV4goUKUoxAoaes8OGv0xKxz2qiFBHNGr-vQNA,204
5
- diaspora_event_sdk/sdk/client.py,sha256=Frs1EjG8OJX5kqqPbGOOFN4UE7vUdhBgyEgvA99NpY8,8016
5
+ diaspora_event_sdk/sdk/client.py,sha256=fbjP_YRmGF2eItnMxNkdz5RIRvur0_P8DhE6AlYk4tM,8541
6
6
  diaspora_event_sdk/sdk/decorators.py,sha256=Gel8AyhIjbf4-FNintTNcOqvC9hHH_YwbOH257Nfmf0,884
7
7
  diaspora_event_sdk/sdk/kafka_client.py,sha256=G1kQQz2TWlahdd2TDdpvaQW7HD7gsuQCnr0tks54ISw,4361
8
- diaspora_event_sdk/sdk/web_client.py,sha256=7dWeKSwB97Hb0O6FvbFMBpp4fKgW-BxprLWb1OiI-ao,4222
8
+ diaspora_event_sdk/sdk/web_client.py,sha256=Rkp0ZUUXCeqbfVFUqX2oxvuLwqqW5_jsJJNN-v2L4FI,4770
9
9
  diaspora_event_sdk/sdk/login_manager/__init__.py,sha256=yeqVgjeHLMX0WZJu2feJmq-fbeXvSxWghVV81ygfY-w,239
10
10
  diaspora_event_sdk/sdk/login_manager/client_login.py,sha256=8ild28_cgPSrLtg3Jhmzpg3EymAvH2UdAhKY52oOB_c,1835
11
11
  diaspora_event_sdk/sdk/login_manager/decorators.py,sha256=EFEp71d0oJ7vo2H8W7DJ2gPrDfGzeNXUNxri1C0l8h0,1047
@@ -18,8 +18,8 @@ diaspora_event_sdk/sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
18
18
  diaspora_event_sdk/sdk/utils/uuid_like.py,sha256=xbxf0YXpDhdii16lwPLWRN21qFekHrNrqODSToMPtCg,470
19
19
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  tests/unit/test_client.py,sha256=sJUtPmnNGnohnP38RQrwcJ4D5j3-g1WFQ6gaKf520AQ,3019
21
- diaspora_event_sdk-0.2.4.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
22
- diaspora_event_sdk-0.2.4.dist-info/METADATA,sha256=GT3z-Ql24vHUPgbjWlVxPvp0OioEJlgADsiWXYsMo3A,2505
23
- diaspora_event_sdk-0.2.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
24
- diaspora_event_sdk-0.2.4.dist-info/top_level.txt,sha256=OVun-67t3fkLFEIwvJuNINgFFvAc--bClYhXjLhMmvs,25
25
- diaspora_event_sdk-0.2.4.dist-info/RECORD,,
21
+ diaspora_event_sdk-0.2.5.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
22
+ diaspora_event_sdk-0.2.5.dist-info/METADATA,sha256=DHOQGmUaQ_OV1AH7z-askINMe-EtzQTL0HSAH4O_vWw,2518
23
+ diaspora_event_sdk-0.2.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
24
+ diaspora_event_sdk-0.2.5.dist-info/top_level.txt,sha256=OVun-67t3fkLFEIwvJuNINgFFvAc--bClYhXjLhMmvs,25
25
+ diaspora_event_sdk-0.2.5.dist-info/RECORD,,