esd-services-api-client 2.5.9__py3-none-any.whl → 2.5.10a140.dev3__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.
- esd_services_api_client/__init__.py +1 -1
- esd_services_api_client/_version.py +1 -0
- esd_services_api_client/nexus/modules/astra_client_module.py +67 -0
- {esd_services_api_client-2.5.9.dist-info → esd_services_api_client-2.5.10a140.dev3.dist-info}/METADATA +1 -1
- {esd_services_api_client-2.5.9.dist-info → esd_services_api_client-2.5.10a140.dev3.dist-info}/RECORD +7 -5
- {esd_services_api_client-2.5.9.dist-info → esd_services_api_client-2.5.10a140.dev3.dist-info}/LICENSE +0 -0
- {esd_services_api_client-2.5.9.dist-info → esd_services_api_client-2.5.10a140.dev3.dist-info}/WHEEL +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = 'v2.5.10a140.dev3'
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Copyright (c) 2023-2024. ECCO Sneaks & Data
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
|
16
|
+
"""
|
17
|
+
Astra Client module that provides the astra client to the Nexus framework.
|
18
|
+
"""
|
19
|
+
|
20
|
+
import os
|
21
|
+
from typing import final
|
22
|
+
|
23
|
+
from adapta.storage.distributed_object_store import AstraClient
|
24
|
+
from injector import Module, singleton, provider
|
25
|
+
|
26
|
+
from esd_services_api_client.nexus.exceptions.startup_error import FatalStartupConfigurationError
|
27
|
+
|
28
|
+
|
29
|
+
@final
|
30
|
+
class AstraClientModule(Module):
|
31
|
+
"""
|
32
|
+
Astra Client module.
|
33
|
+
"""
|
34
|
+
|
35
|
+
@singleton
|
36
|
+
@provider
|
37
|
+
def provide(self) -> AstraClient:
|
38
|
+
"""
|
39
|
+
DI factory method.
|
40
|
+
"""
|
41
|
+
missing_env_vars = []
|
42
|
+
|
43
|
+
if "CRYSTAL__ALGORITHM_NAME" not in os.environ:
|
44
|
+
missing_env_vars.append("CRYSTAL__ALGORITHM_NAME")
|
45
|
+
|
46
|
+
if "CRYSTAL__ASTRA_KEYSPACE" not in os.environ:
|
47
|
+
missing_env_vars.append("CRYSTAL__ASTRA_KEYSPACE")
|
48
|
+
|
49
|
+
if "PROTEUS__ASTRA_BUNDLE_BYTES" not in os.environ:
|
50
|
+
missing_env_vars.append("PROTEUS__ASTRA_BUNDLE_BYTES")
|
51
|
+
|
52
|
+
if "PROTEUS__ASTRA_CLIENT_ID" not in os.environ:
|
53
|
+
missing_env_vars.append("PROTEUS__ASTRA_CLIENT_ID")
|
54
|
+
|
55
|
+
if "PROTEUS__ASTRA_CLIENT_SECRET" not in os.environ:
|
56
|
+
missing_env_vars.append("PROTEUS__ASTRA_CLIENT_SECRET")
|
57
|
+
|
58
|
+
if missing_env_vars:
|
59
|
+
raise FatalStartupConfigurationError(', '.join(missing_env_vars))
|
60
|
+
|
61
|
+
return AstraClient(
|
62
|
+
client_name=os.getenv("CRYSTAL__ALGORITHM_NAME"),
|
63
|
+
keyspace=os.getenv("CRYSTAL__ASTRA_KEYSPACE"),
|
64
|
+
secure_connect_bundle_bytes=os.getenv("PROTEUS__ASTRA_BUNDLE_BYTES"),
|
65
|
+
client_id=os.getenv("PROTEUS__ASTRA_CLIENT_ID"),
|
66
|
+
client_secret=os.getenv("PROTEUS__ASTRA_CLIENT_SECRET"),
|
67
|
+
)
|
{esd_services_api_client-2.5.9.dist-info → esd_services_api_client-2.5.10a140.dev3.dist-info}/RECORD
RENAMED
@@ -1,4 +1,5 @@
|
|
1
|
-
esd_services_api_client/__init__.py,sha256=
|
1
|
+
esd_services_api_client/__init__.py,sha256=4LskDwFuAFMOjHtN3_-71G_VZ4MNfjMJ7wX2cHYxV-0,648
|
2
|
+
esd_services_api_client/_version.py,sha256=YDbs8pvwJV-ivDNK_JHEaX9t3V0ltlB9lsHA5KRfTxA,33
|
2
3
|
esd_services_api_client/beast/__init__.py,sha256=zNhXcHSP5w4P9quM1XP4oXVJEccvC_VScG41TZ0GzZ8,723
|
3
4
|
esd_services_api_client/beast/v3/__init__.py,sha256=FtumtInoDyCCRE424Llqv8QZLRuwXzj-smyfu1od1nc,754
|
4
5
|
esd_services_api_client/beast/v3/_connector.py,sha256=VqxiCzJWKERh42aZAIphzmOEG5cdOcKM0DQzG7eQ_-8,11479
|
@@ -45,11 +46,12 @@ esd_services_api_client/nexus/input/input_processor.py,sha256=vqzeQrtRFqBKTPSEiW
|
|
45
46
|
esd_services_api_client/nexus/input/input_reader.py,sha256=aXNMGxrdUX5RDYR666GSGkcZqYMFYoZ8zGVDuUFFFZQ,3505
|
46
47
|
esd_services_api_client/nexus/input/payload_reader.py,sha256=Kq0xN1Shyqv71v6YkcrqVTDbmsEjZc8ithsXYpyu87M,2516
|
47
48
|
esd_services_api_client/nexus/modules/__init__.py,sha256=MRui7s4uqAiLTRmBx3EyfS9CvYfYcaQXZuO829hwYio,705
|
49
|
+
esd_services_api_client/nexus/modules/astra_client_module.py,sha256=Hg9pANABq4uPVtq_BfZkiKEueRR-KhI9UDxCXqjbMr4,2268
|
48
50
|
esd_services_api_client/nexus/modules/mlflow_module.py,sha256=d4y8XetGF37md4dEpEO0CFPj2lDmK_f6LspUm4dRAW4,1331
|
49
51
|
esd_services_api_client/nexus/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
52
|
esd_services_api_client/nexus/telemetry/recorder.py,sha256=j4x-wOSNZHkFco-ENlKtSm22d4WGHmuzKMnzvGQAtlQ,4849
|
51
53
|
esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=NOcb2l1SkMHinBXSrfbiBZSpufzhBWkuh3Px3NXrkcg,4997
|
52
|
-
esd_services_api_client-2.5.
|
53
|
-
esd_services_api_client-2.5.
|
54
|
-
esd_services_api_client-2.5.
|
55
|
-
esd_services_api_client-2.5.
|
54
|
+
esd_services_api_client-2.5.10a140.dev3.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
|
55
|
+
esd_services_api_client-2.5.10a140.dev3.dist-info/METADATA,sha256=cLEm3cqd78RW-AjpsJt-h00EQzSRuuv60QFpg5yblVg,1174
|
56
|
+
esd_services_api_client-2.5.10a140.dev3.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
57
|
+
esd_services_api_client-2.5.10a140.dev3.dist-info/RECORD,,
|
File without changes
|
{esd_services_api_client-2.5.9.dist-info → esd_services_api_client-2.5.10a140.dev3.dist-info}/WHEEL
RENAMED
File without changes
|