diaspora-event-sdk 0.3.2__py3-none-any.whl → 0.3.4__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.
@@ -26,15 +26,25 @@ def get_diaspora_config(extra_configs: Dict[str, Any] = {}) -> Dict[str, Any]:
26
26
  Retrieve default Diaspora event fabric connection configurations for Kafka clients.
27
27
  Merges default configurations with custom ones provided.
28
28
  """
29
+
30
+ bootstrap_servers = None
29
31
  try:
30
- keys = Client().retrieve_key()
31
- os.environ["AWS_ACCESS_KEY_ID"] = keys["access_key"]
32
- os.environ["AWS_SECRET_ACCESS_KEY"] = keys["secret_key"]
32
+ if (
33
+ "OCTOPUS_AWS_ACCESS_KEY_ID" not in os.environ
34
+ and "OCTOPUS_AWS_SECRET_ACCESS_KEY" not in os.environ
35
+ and "OCTOPUS_BOOTSTRAP_SERVERS" not in os.environ
36
+ ):
37
+ keys = Client().retrieve_key()
38
+ os.environ["OCTOPUS_AWS_ACCESS_KEY_ID"] = keys["access_key"]
39
+ os.environ["OCTOPUS_AWS_SECRET_ACCESS_KEY"] = keys["secret_key"]
40
+ bootstrap_servers = keys["endpoint"]
41
+ else:
42
+ bootstrap_servers = os.environ["OCTOPUS_BOOTSTRAP_SERVERS"]
33
43
  except Exception as e:
34
44
  raise RuntimeError("Failed to retrieve Kafka keys") from e
35
45
 
36
46
  conf = {
37
- "bootstrap_servers": keys["endpoint"],
47
+ "bootstrap_servers": bootstrap_servers,
38
48
  "security_protocol": "SASL_SSL",
39
49
  "sasl_mechanism": "OAUTHBEARER",
40
50
  "api_version": (3, 5, 1),
@@ -1 +1 @@
1
- __version__ = "0.3.2"
1
+ __version__ = "0.3.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diaspora-event-sdk
3
- Version: 0.3.2
3
+ Version: 0.3.4
4
4
  Summary: Diaspora Event Fabric SDK
5
5
  Home-page: https://github.com/globus-labs/diaspora-event-sdk
6
6
  License: Apache 2.0
@@ -16,20 +16,29 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: globus-sdk <4,>=3.20.1
19
+ Requires-Dist: globus-sdk<4,>=3.20.1
20
20
  Provides-Extra: kafka-python
21
- Requires-Dist: kafka-python ; extra == 'kafka-python'
21
+ Requires-Dist: kafka-python; extra == "kafka-python"
22
22
  Provides-Extra: test
23
- Requires-Dist: pytest ; extra == 'test'
24
- Requires-Dist: pytest-cov ; extra == 'test'
25
- Requires-Dist: coverage ; extra == 'test'
26
- Requires-Dist: mypy ; extra == 'test'
27
- Requires-Dist: tox ; extra == 'test'
28
- Requires-Dist: check-manifest ; extra == 'test'
29
- Requires-Dist: pre-commit ; extra == 'test'
23
+ Requires-Dist: pytest; extra == "test"
24
+ Requires-Dist: pytest-cov; extra == "test"
25
+ Requires-Dist: coverage; extra == "test"
26
+ Requires-Dist: mypy; extra == "test"
27
+ Requires-Dist: tox; extra == "test"
28
+ Requires-Dist: check-manifest; extra == "test"
29
+ Requires-Dist: pre-commit; extra == "test"
30
30
 
31
31
  # Diaspora Event Fabric SDK
32
32
 
33
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/globus-labs/diaspora-event-sdk/main.svg)](https://results.pre-commit.ci/latest/github/globus-labs/diaspora-event-sdk/main)
34
+ [![Tests](https://github.com/globus-labs/diaspora-event-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/globus-labs/diaspora-event-sdk/actions/workflows/tests.yml)
35
+ [![Release](https://github.com/globus-labs/diaspora-event-sdk/actions/workflows/release.yml/badge.svg)](https://github.com/globus-labs/diaspora-event-sdk/actions/workflows/release.yml)
36
+ [![GitHub Release](https://img.shields.io/github/v/release/globus-labs/diaspora-event-sdk?color=teal)](https://github.com/globus-labs/diaspora-event-sdk/releases)
37
+ [![PyPI Version](https://img.shields.io/pypi/v/diaspora-event-sdk?color=teal)](https://pypi.org/project/diaspora-event-sdk/)
38
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
39
+ [![Python Versions](https://img.shields.io/pypi/pyversions/diaspora-event-sdk.svg)](https://pypi.org/project/diaspora-event-sdk/)
40
+
41
+
33
42
  ## Installation Guide
34
43
  ### Recommended Method: With `kafka-python`
35
44
  To integrate with Diaspora Event Fabric using `KafkaProducer` and `KafkaConsumer`, install the SDK with `kafka-python`:
@@ -1,11 +1,11 @@
1
1
  diaspora_event_sdk/__init__.py,sha256=x5A69JeA_iNi0i1XK3T2wuSTiOLxRhNdGYN4G39wtFw,455
2
- diaspora_event_sdk/version.py,sha256=vNiWJ14r_cw5t_7UDqDQIVZvladKFGyHH2avsLpN7Vg,22
2
+ diaspora_event_sdk/version.py,sha256=oYLGMpySamd16KLiaBTfRyrAS7_oyp-TOEHmzmeumwg,22
3
3
  diaspora_event_sdk/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  diaspora_event_sdk/sdk/_environments.py,sha256=lrdUaBCmlv6kESLi3O9EN6cMGXEylO8zWQX7NQ8OKCQ,684
5
5
  diaspora_event_sdk/sdk/aws_iam_msk.py,sha256=VMQpA-20fFWaAzzv9TyBpDK8dcMHS4tijjjsYhTJF74,3892
6
6
  diaspora_event_sdk/sdk/client.py,sha256=Mzsd8WDyaAGMkNDDjpzrWMLPwyC6JoeFVYb0YERrBrk,8774
7
7
  diaspora_event_sdk/sdk/decorators.py,sha256=Gel8AyhIjbf4-FNintTNcOqvC9hHH_YwbOH257Nfmf0,884
8
- diaspora_event_sdk/sdk/kafka_client.py,sha256=ZwNf83gahsLVRHert8YeiruioWAoEIOSTSKZOY-A2PY,4271
8
+ diaspora_event_sdk/sdk/kafka_client.py,sha256=iFTSmV24_hLWhqF16j44gkyk5psYKz8hX3nY6ChIWyE,4675
9
9
  diaspora_event_sdk/sdk/web_client.py,sha256=mc6OvYgq8Cl-irjOW5FfhU_1fl1nRF8OKlPPmaQc0zo,4992
10
10
  diaspora_event_sdk/sdk/botocore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  diaspora_event_sdk/sdk/botocore/auth.py,sha256=QXwCNMzM0wAqD64RlFd-K27atRpixti73VKConpb1kk,18699
@@ -25,10 +25,10 @@ diaspora_event_sdk/sdk/login_manager/tokenstore.py,sha256=ImncC8EIxoAuGtDiZIwdtU
25
25
  diaspora_event_sdk/sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  diaspora_event_sdk/sdk/utils/uuid_like.py,sha256=xbxf0YXpDhdii16lwPLWRN21qFekHrNrqODSToMPtCg,470
27
27
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- tests/unit/apis_test.py,sha256=S_6JjHU-YAcz6nITveN5qzkINkWrrgDcIPR8Ik8JNf4,4365
28
+ tests/unit/apis_test.py,sha256=fgDUgDUzC7lMmCX6gHAUHU2AFLcHDJ5u0oKDH0x5GhU,4445
29
29
  tests/unit/client_test.py,sha256=sJUtPmnNGnohnP38RQrwcJ4D5j3-g1WFQ6gaKf520AQ,3019
30
- diaspora_event_sdk-0.3.2.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
31
- diaspora_event_sdk-0.3.2.dist-info/METADATA,sha256=Kbh3TYXM7n3D_RmW9CJvXvFER3JmQ4e5gkP3w-ggiB8,2548
32
- diaspora_event_sdk-0.3.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
33
- diaspora_event_sdk-0.3.2.dist-info/top_level.txt,sha256=OVun-67t3fkLFEIwvJuNINgFFvAc--bClYhXjLhMmvs,25
34
- diaspora_event_sdk-0.3.2.dist-info/RECORD,,
30
+ diaspora_event_sdk-0.3.4.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
31
+ diaspora_event_sdk-0.3.4.dist-info/METADATA,sha256=GztAbJ_bNHmuucrmur2H7W6jTVaYJUSovBKSYBp07eY,3631
32
+ diaspora_event_sdk-0.3.4.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
33
+ diaspora_event_sdk-0.3.4.dist-info/top_level.txt,sha256=OVun-67t3fkLFEIwvJuNINgFFvAc--bClYhXjLhMmvs,25
34
+ diaspora_event_sdk-0.3.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.44.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
tests/unit/apis_test.py CHANGED
@@ -18,6 +18,9 @@ def setup():
18
18
  client_id = os.environ["DIASPORA_SDK_CLIENT_ID"]
19
19
  client_secret = os.environ["DIASPORA_SDK_CLIENT_SECRET"]
20
20
  requested_scopes = os.environ["CLIENT_SCOPE"]
21
+ # assert client_id
22
+ # assert client_secret
23
+ # assert requested_scopes
21
24
 
22
25
  ca = ConfidentialAppAuthClient(
23
26
  client_id=client_id,