diaspora-event-sdk 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. diaspora-event-sdk-0.1.2/PKG-INFO +47 -0
  2. diaspora-event-sdk-0.1.2/README.md +27 -0
  3. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/kafka_client.py +2 -1
  4. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/manager.py +2 -3
  5. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/web_client.py +16 -9
  6. diaspora-event-sdk-0.1.2/diaspora_event_sdk/version.py +1 -0
  7. diaspora-event-sdk-0.1.2/diaspora_event_sdk.egg-info/PKG-INFO +47 -0
  8. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/tests/unit/test_client.py +30 -10
  9. diaspora-event-sdk-0.1.1/PKG-INFO +0 -47
  10. diaspora-event-sdk-0.1.1/README.md +0 -27
  11. diaspora-event-sdk-0.1.1/diaspora_event_sdk/version.py +0 -1
  12. diaspora-event-sdk-0.1.1/diaspora_event_sdk.egg-info/PKG-INFO +0 -47
  13. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/LICENSE +0 -0
  14. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/MANIFEST.in +0 -0
  15. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/__init__.py +0 -0
  16. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/__init__.py +0 -0
  17. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/_environments.py +0 -0
  18. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/client.py +0 -0
  19. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/decorators.py +0 -0
  20. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/__init__.py +0 -0
  21. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/client_login.py +0 -0
  22. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/decorators.py +0 -0
  23. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/globus_auth.py +0 -0
  24. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/login_flow.py +0 -0
  25. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/protocol.py +0 -0
  26. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/login_manager/tokenstore.py +0 -0
  27. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/utils/__init__.py +0 -0
  28. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk/sdk/utils/uuid_like.py +0 -0
  29. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk.egg-info/SOURCES.txt +0 -0
  30. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk.egg-info/dependency_links.txt +0 -0
  31. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk.egg-info/requires.txt +0 -0
  32. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/diaspora_event_sdk.egg-info/top_level.txt +0 -0
  33. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/setup.cfg +0 -0
  34. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/setup.py +0 -0
  35. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/tests/__init__.py +0 -0
  36. {diaspora-event-sdk-0.1.1 → diaspora-event-sdk-0.1.2}/tox.ini +0 -0
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.1
2
+ Name: diaspora-event-sdk
3
+ Version: 0.1.2
4
+ Summary: SDK of Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge
5
+ Home-page: https://github.com/globus-labs/diaspora-event-sdk
6
+ License: LICENSE
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: globus-sdk<4,>=3.20.1
10
+ 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
+ Provides-Extra: test
14
+ Requires-Dist: pytest; extra == "test"
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"
20
+
21
+ # Diaspora: Resilience-enabling services for science from HPC to edge
22
+
23
+ ## Event Fabric SDK Installation Guide
24
+ ### Recommended Method: Use with `kafka-python`
25
+ For easy integration with Diaspora Event Fabric, use the `KafkaProducer` and `KafkaConsumer` classes from our SDK. This requires the `kafka-python` library.
26
+
27
+ To install the Event Fabric SDK and `kafka-python,` with the following command:
28
+ ```bash
29
+ pip install "diaspora-event-sdk[kafka-python]"
30
+ ```
31
+
32
+ ### Alternative Installation: Without Kafka Client Library
33
+ To use alternative Kafka client libraries (e.g., `confluent-kafka-python`, `aiokafka`, and libraries for other programming laguages), you can install the SDK without the `kafka-python` dependency. This option still provides topic-level access control (authorization) and login credential management features.
34
+
35
+ To install the SDK without `kafka-python`, use:
36
+ ```bash
37
+ pip install diaspora-event-sdk
38
+ ```
39
+ Note: This method does not include dependencies for `KafkaProducer` and `KafkaConsumer` classes mentioned in the QuickStart
40
+
41
+ ## Use Diaspora Event Fabric SDK
42
+
43
+ **Getting Started**: Visit our [QuickStart Guide](docs/quickstart.md) for details on using the SDK with the kafka-python library and instructions for other Kafka clients.
44
+
45
+ **Troubleshooting and Credential Management**: Consult our [TrobleShooting Guide](docs/troubleshooting.md) for solving common issues and tips on managing keys effectively.
46
+
47
+ **Advanced Usage**: Explore the [Faust Streaming Guide](docs/faust_weather_app.md) for advanced event streaming with Faust.
@@ -0,0 +1,27 @@
1
+ # Diaspora: Resilience-enabling services for science from HPC to edge
2
+
3
+ ## Event Fabric SDK Installation Guide
4
+ ### Recommended Method: Use with `kafka-python`
5
+ For easy integration with Diaspora Event Fabric, use the `KafkaProducer` and `KafkaConsumer` classes from our SDK. This requires the `kafka-python` library.
6
+
7
+ To install the Event Fabric SDK and `kafka-python,` with the following command:
8
+ ```bash
9
+ pip install "diaspora-event-sdk[kafka-python]"
10
+ ```
11
+
12
+ ### Alternative Installation: Without Kafka Client Library
13
+ To use alternative Kafka client libraries (e.g., `confluent-kafka-python`, `aiokafka`, and libraries for other programming laguages), you can install the SDK without the `kafka-python` dependency. This option still provides topic-level access control (authorization) and login credential management features.
14
+
15
+ To install the SDK without `kafka-python`, use:
16
+ ```bash
17
+ pip install diaspora-event-sdk
18
+ ```
19
+ Note: This method does not include dependencies for `KafkaProducer` and `KafkaConsumer` classes mentioned in the QuickStart
20
+
21
+ ## Use Diaspora Event Fabric SDK
22
+
23
+ **Getting Started**: Visit our [QuickStart Guide](docs/quickstart.md) for details on using the SDK with the kafka-python library and instructions for other Kafka clients.
24
+
25
+ **Troubleshooting and Credential Management**: Consult our [TrobleShooting Guide](docs/troubleshooting.md) for solving common issues and tips on managing keys effectively.
26
+
27
+ **Advanced Usage**: Explore the [Faust Streaming Guide](docs/faust_weather_app.md) for advanced event streaming with Faust.
@@ -10,7 +10,7 @@ kafka_available = True
10
10
  try:
11
11
  from kafka import KafkaProducer as KProd # type: ignore[import,import-not-found]
12
12
  from kafka import KafkaConsumer as KCons # type: ignore[import,import-not-found]
13
- from aws_msk_iam_sasl_signer import MSKAuthTokenProvider
13
+ from aws_msk_iam_sasl_signer import MSKAuthTokenProvider # type: ignore[import,import-not-found]
14
14
  import os
15
15
 
16
16
  class MSKTokenProvider:
@@ -56,6 +56,7 @@ if kafka_available:
56
56
  class KafkaConsumer(KCons):
57
57
  def __init__(self, *topics, **configs):
58
58
  super().__init__(*topics, **get_diaspora_config(configs))
59
+
59
60
  else:
60
61
  # Create dummy classes that issue a warning when instantiated
61
62
  class KafkaProducer: # type: ignore[no-redef]
@@ -22,7 +22,7 @@ log = logging.getLogger(__name__)
22
22
  def _get_diaspora_all_scope() -> str:
23
23
  return os.getenv(
24
24
  "DIASPORA_SCOPE",
25
- f"https://auth.globus.org/scopes/{DIASPORA_RESOURCE_SERVER}/action_all"
25
+ f"https://auth.globus.org/scopes/{DIASPORA_RESOURCE_SERVER}/action_all",
26
26
  )
27
27
 
28
28
 
@@ -57,8 +57,7 @@ class LoginManager:
57
57
  }
58
58
 
59
59
  def __init__(self, *, environment: str | None = None) -> None:
60
- self._token_storage = get_token_storage_adapter(
61
- environment=environment)
60
+ self._token_storage = get_token_storage_adapter(environment=environment)
62
61
  self._access_lock = threading.Lock()
63
62
 
64
63
  @property
@@ -7,7 +7,6 @@ from ._environments import TOKEN_EXCHANGE
7
7
 
8
8
 
9
9
  class WebClient(globus_sdk.BaseClient):
10
-
11
10
  def __init__(
12
11
  self,
13
12
  *,
@@ -25,13 +24,21 @@ class WebClient(globus_sdk.BaseClient):
25
24
  self.user_app_name = app_name
26
25
 
27
26
  def create_key(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
28
- return self.post("/v2/create_key", headers={"Subject": str(subject)})
27
+ return self.post("/v1/create_key", headers={"Subject": str(subject)})
29
28
 
30
29
  def list_topics(self, subject: UUID_LIKE_T) -> globus_sdk.GlobusHTTPResponse:
31
- return self.get("/v2/list_topics", headers={"Subject": str(subject)})
32
-
33
- def register_topic(self, subject: UUID_LIKE_T, topic: str) -> globus_sdk.GlobusHTTPResponse:
34
- return self.post("/v2/register_topic", headers={"Subject": str(subject), "Topic": topic})
35
-
36
- def unregister_topic(self, subject: UUID_LIKE_T, topic: str) -> globus_sdk.GlobusHTTPResponse:
37
- return self.post("/v2/unregister_topic", headers={"Subject": str(subject), "Topic": topic})
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
+ )
@@ -0,0 +1 @@
1
+ __version__ = "0.1.2"
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.1
2
+ Name: diaspora-event-sdk
3
+ Version: 0.1.2
4
+ Summary: SDK of Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge
5
+ Home-page: https://github.com/globus-labs/diaspora-event-sdk
6
+ License: LICENSE
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: globus-sdk<4,>=3.20.1
10
+ 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
+ Provides-Extra: test
14
+ Requires-Dist: pytest; extra == "test"
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"
20
+
21
+ # Diaspora: Resilience-enabling services for science from HPC to edge
22
+
23
+ ## Event Fabric SDK Installation Guide
24
+ ### Recommended Method: Use with `kafka-python`
25
+ For easy integration with Diaspora Event Fabric, use the `KafkaProducer` and `KafkaConsumer` classes from our SDK. This requires the `kafka-python` library.
26
+
27
+ To install the Event Fabric SDK and `kafka-python,` with the following command:
28
+ ```bash
29
+ pip install "diaspora-event-sdk[kafka-python]"
30
+ ```
31
+
32
+ ### Alternative Installation: Without Kafka Client Library
33
+ To use alternative Kafka client libraries (e.g., `confluent-kafka-python`, `aiokafka`, and libraries for other programming laguages), you can install the SDK without the `kafka-python` dependency. This option still provides topic-level access control (authorization) and login credential management features.
34
+
35
+ To install the SDK without `kafka-python`, use:
36
+ ```bash
37
+ pip install diaspora-event-sdk
38
+ ```
39
+ Note: This method does not include dependencies for `KafkaProducer` and `KafkaConsumer` classes mentioned in the QuickStart
40
+
41
+ ## Use Diaspora Event Fabric SDK
42
+
43
+ **Getting Started**: Visit our [QuickStart Guide](docs/quickstart.md) for details on using the SDK with the kafka-python library and instructions for other Kafka clients.
44
+
45
+ **Troubleshooting and Credential Management**: Consult our [TrobleShooting Guide](docs/troubleshooting.md) for solving common issues and tips on managing keys effectively.
46
+
47
+ **Advanced Usage**: Explore the [Faust Streaming Guide](docs/faust_weather_app.md) for advanced event streaming with Faust.
@@ -1,20 +1,31 @@
1
1
  import pytest
2
- from unittest.mock import Mock, patch
2
+ from unittest.mock import Mock
3
3
  from unittest.mock import MagicMock
4
4
  from diaspora_event_sdk import Client
5
5
  from diaspora_event_sdk.sdk.web_client import WebClient
6
6
  from diaspora_event_sdk.sdk.login_manager import LoginManager
7
7
 
8
+
8
9
  @pytest.fixture
9
- def mock_login_manager(): # TODO
10
+ def mock_login_manager(): # TODO
10
11
  login_manager = Mock(spec=LoginManager())
11
12
  login_manager.get_web_client.return_value = Mock(spec=WebClient)
12
13
  login_manager.get_auth_client.return_value = Mock(
13
- oauth2_userinfo=lambda: {"sub": "test_sub"})
14
+ oauth2_userinfo=lambda: {"sub": "test_sub"}
15
+ )
14
16
  login_manager._token_storage.get_token_data.return_value = {
15
- 'access_key': 'test_access', 'secret_key': 'test_secret'}
17
+ "username": "test_sub",
18
+ "access_key": "test_access",
19
+ "secret_key": "test_secret",
20
+ "endpoint": "test_endpoint",
21
+ }
16
22
  login_manager.get_web_client.return_value.create_key.return_value = {
17
- "status": "success", "access_key": "new_access", "secret_key": "new_secret"}
23
+ "status": "success",
24
+ "username": "test_sub",
25
+ "access_key": "new_access",
26
+ "secret_key": "new_secret",
27
+ "endpoint": "new_endpoint",
28
+ }
18
29
 
19
30
  # Use MagicMock for _access_lock
20
31
  login_manager._access_lock = MagicMock()
@@ -40,12 +51,20 @@ def test_logout(client):
40
51
 
41
52
  def test_create_key(client):
42
53
  result = client.create_key()
43
- assert result == {"username": "test_sub", "password": "new_secret"}
54
+ assert result == {
55
+ "access_key": "new_access",
56
+ "secret_key": "new_secret",
57
+ "endpoint": "new_endpoint",
58
+ }
44
59
 
45
60
 
46
61
  def test_retrieve_key_existing(client):
47
62
  result = client.retrieve_key()
48
- assert result == {"username": "test_sub", "password": "test_secret"}
63
+ assert result == {
64
+ "access_key": "test_access",
65
+ "secret_key": "test_secret",
66
+ "endpoint": "test_endpoint",
67
+ }
49
68
 
50
69
 
51
70
  def test_retrieve_key_missing(client, mock_login_manager):
@@ -53,14 +72,15 @@ def test_retrieve_key_missing(client, mock_login_manager):
53
72
  # the second call returns scope, resource_server, access_token, refresh_token, etc.
54
73
  mock_login_manager._token_storage.get_token_data.side_effect = [
55
74
  None,
56
- {'scope': 'scope', 'resource_server': 'resource_server'}
75
+ {"scope": "scope", "resource_server": "resource_server"},
57
76
  ]
58
77
 
59
78
  # should internally call create_key
60
79
  result = client.retrieve_key()
61
80
 
62
- assert result["username"] == "test_sub"
63
- assert result["password"] == "new_secret"
81
+ assert result["access_key"] == "new_access"
82
+ assert result["secret_key"] == "new_secret"
83
+ assert result["endpoint"] == "new_endpoint"
64
84
 
65
85
 
66
86
  def test_list_topics(client):
@@ -1,47 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: diaspora-event-sdk
3
- Version: 0.1.1
4
- Summary: SDK of Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge
5
- Home-page: https://github.com/globus-labs/diaspora-event-sdk
6
- License: LICENSE
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: globus-sdk<4,>=3.20.1
10
- 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
- Provides-Extra: test
14
- Requires-Dist: pytest; extra == "test"
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"
20
-
21
- <h1>Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge</h1>
22
-
23
- ## Installation
24
- ### Recommended Installation with Kafka Client Library
25
- The `KafkaProducer` and `KafkaConsumer` classes within the SDK are designed for seamless integration with Diaspora Event Fabric using pre-configured settings. For utilizing these classes, the `kafka-python` library is necessary.
26
-
27
- To install the Diaspora Event SDK along with `kafka-python,` execute:
28
- ```bash
29
- pip install "diaspora-event-sdk[kafka-python]"
30
- ```
31
-
32
- ### Installation Without Kafka Client Library
33
- If you prefer using different client libraries for Kafka communication, you can install the SDK without the kafka-python dependency. The SDK still serves for topic-level access control (authorization) and login credential management (authentication).
34
-
35
- To install the SDK without client libraries, simply run:
36
- ```bash
37
- pip install diaspora-event-sdk
38
- ```
39
- Note: This does not install the necessary dependency for `KafkaProducer` and `KafkaConsumer` classes.
40
-
41
- ## Use Diaspora Event Fabric SDK
42
-
43
- Please refer to our [QuickStart Guide](docs/quickstart.md) for recommended use with `kafka-python` library as well as steps to use your own Kafka client.
44
-
45
- Please refer to our [TrobleShooting Guide](docs/troubleshooting.md) for debugging common problems and effective key management strategies.
46
-
47
- [Topic: Use faust to Process Records](docs/faust_weather_app.md)
@@ -1,27 +0,0 @@
1
- <h1>Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge</h1>
2
-
3
- ## Installation
4
- ### Recommended Installation with Kafka Client Library
5
- The `KafkaProducer` and `KafkaConsumer` classes within the SDK are designed for seamless integration with Diaspora Event Fabric using pre-configured settings. For utilizing these classes, the `kafka-python` library is necessary.
6
-
7
- To install the Diaspora Event SDK along with `kafka-python,` execute:
8
- ```bash
9
- pip install "diaspora-event-sdk[kafka-python]"
10
- ```
11
-
12
- ### Installation Without Kafka Client Library
13
- If you prefer using different client libraries for Kafka communication, you can install the SDK without the kafka-python dependency. The SDK still serves for topic-level access control (authorization) and login credential management (authentication).
14
-
15
- To install the SDK without client libraries, simply run:
16
- ```bash
17
- pip install diaspora-event-sdk
18
- ```
19
- Note: This does not install the necessary dependency for `KafkaProducer` and `KafkaConsumer` classes.
20
-
21
- ## Use Diaspora Event Fabric SDK
22
-
23
- Please refer to our [QuickStart Guide](docs/quickstart.md) for recommended use with `kafka-python` library as well as steps to use your own Kafka client.
24
-
25
- Please refer to our [TrobleShooting Guide](docs/troubleshooting.md) for debugging common problems and effective key management strategies.
26
-
27
- [Topic: Use faust to Process Records](docs/faust_weather_app.md)
@@ -1 +0,0 @@
1
- __version__ = "0.1.1"
@@ -1,47 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: diaspora-event-sdk
3
- Version: 0.1.1
4
- Summary: SDK of Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge
5
- Home-page: https://github.com/globus-labs/diaspora-event-sdk
6
- License: LICENSE
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: globus-sdk<4,>=3.20.1
10
- 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
- Provides-Extra: test
14
- Requires-Dist: pytest; extra == "test"
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"
20
-
21
- <h1>Diaspora Event Fabric: Resilience-enabling services for science from HPC to edge</h1>
22
-
23
- ## Installation
24
- ### Recommended Installation with Kafka Client Library
25
- The `KafkaProducer` and `KafkaConsumer` classes within the SDK are designed for seamless integration with Diaspora Event Fabric using pre-configured settings. For utilizing these classes, the `kafka-python` library is necessary.
26
-
27
- To install the Diaspora Event SDK along with `kafka-python,` execute:
28
- ```bash
29
- pip install "diaspora-event-sdk[kafka-python]"
30
- ```
31
-
32
- ### Installation Without Kafka Client Library
33
- If you prefer using different client libraries for Kafka communication, you can install the SDK without the kafka-python dependency. The SDK still serves for topic-level access control (authorization) and login credential management (authentication).
34
-
35
- To install the SDK without client libraries, simply run:
36
- ```bash
37
- pip install diaspora-event-sdk
38
- ```
39
- Note: This does not install the necessary dependency for `KafkaProducer` and `KafkaConsumer` classes.
40
-
41
- ## Use Diaspora Event Fabric SDK
42
-
43
- Please refer to our [QuickStart Guide](docs/quickstart.md) for recommended use with `kafka-python` library as well as steps to use your own Kafka client.
44
-
45
- Please refer to our [TrobleShooting Guide](docs/troubleshooting.md) for debugging common problems and effective key management strategies.
46
-
47
- [Topic: Use faust to Process Records](docs/faust_weather_app.md)