esd-services-api-client 2.6.1a149.dev16__py3-none-any.whl → 2.6.2__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.
@@ -17,4 +17,4 @@
17
17
  Root index.
18
18
  """
19
19
 
20
- __version__ = "0.0.0"
20
+ __version__ = "2.6.2"
@@ -36,8 +36,6 @@ class BootstrapLogger(LoggerInterface, ABC):
36
36
  Dummy class to separate bootstrap logging from core app loggers
37
37
  """
38
38
 
39
- pass
40
-
41
39
 
42
40
  @final
43
41
  class BootstrapLoggerFactory:
@@ -215,6 +215,11 @@ class Nexus:
215
215
  | None = None,
216
216
  delimiter: str = ", ",
217
217
  ) -> "Nexus":
218
+ """
219
+ Adds a log `tagger` and a log `enricher` to be used with injected logger.
220
+ A log `tagger` will add key-value tags to each emitted log message, and those tags can be inferred from the payload and entrypoint arguments.
221
+ A log `enricher` will add additional static templated content to log messages, and render those templates using payload properties entrypoint argyments.
222
+ """
218
223
  self._log_tagger = tagger
219
224
  self._log_enricher = enricher
220
225
  self._log_enrichment_delimiter = delimiter
@@ -378,8 +383,8 @@ class Nexus:
378
383
 
379
384
  # record telemetry
380
385
  root_logger.info(
381
- "Recording telemetry for the run {request_id}",
382
- request_id=self._run_args.request_id,
386
+ "Recording telemetry for the run {run_id}",
387
+ run_id=self._run_args.request_id,
383
388
  )
384
389
  async with telemetry_recorder as recorder:
385
390
  await recorder.record(
@@ -2,10 +2,10 @@
2
2
  from typing import final, Any, TypeVar, Type
3
3
 
4
4
  import pandas
5
- from adapta.storage.models.format import (
6
- DataFrameParquetSerializationFormat,
5
+ from adapta.storage.models.format import SerializationFormat
6
+ from adapta.storage.models.formatters import (
7
+ PandasDataFrameParquetSerializationFormat,
7
8
  DictJsonSerializationFormat,
8
- SerializationFormat,
9
9
  )
10
10
 
11
11
  T = TypeVar("T") # pylint: disable=C0103
@@ -59,7 +59,7 @@ class TelemetrySerializer(Serializer):
59
59
  def __init__(self):
60
60
  super().__init__(
61
61
  default_serialization_formats={
62
- pandas.DataFrame: DataFrameParquetSerializationFormat,
62
+ pandas.DataFrame: PandasDataFrameParquetSerializationFormat,
63
63
  dict: DictJsonSerializationFormat,
64
64
  }
65
65
  )
@@ -72,7 +72,7 @@ class ResultSerializer(Serializer):
72
72
  def __init__(self):
73
73
  super().__init__(
74
74
  default_serialization_formats={
75
- pandas.DataFrame: DataFrameParquetSerializationFormat,
75
+ pandas.DataFrame: PandasDataFrameParquetSerializationFormat,
76
76
  dict: DictJsonSerializationFormat,
77
77
  }
78
78
  )
@@ -21,7 +21,7 @@ from dataclasses import dataclass
21
21
 
22
22
  from typing import final, Optional, Type
23
23
 
24
- from adapta.storage.models.format import DictJsonSerializationFormat
24
+ from adapta.storage.models.formatters import DictJsonSerializationFormat
25
25
  from adapta.utils import session_with_retries
26
26
 
27
27
  from dataclasses_json import DataClassJsonMixin
@@ -43,7 +43,9 @@ class UserTelemetry:
43
43
  """
44
44
 
45
45
  def __init__(
46
- self, telemetry: DataFrame, *telemetry_path_segments: UserTelemetryPathSegment
46
+ self,
47
+ telemetry: DataFrame,
48
+ *telemetry_path_segments: UserTelemetryPathSegment,
47
49
  ):
48
50
  self._telemetry = telemetry
49
51
  self._telemetry_path_segments = telemetry_path_segments
@@ -143,6 +145,8 @@ class UserTelemetryRecorder(Generic[TPayload, TResult], ABC):
143
145
  )
144
146
  return
145
147
 
148
+ serializer = self._serializer.get_serialization_format(telemetry.telemetry)
149
+
146
150
  self._storage_client.save_data_as_blob(
147
151
  data=telemetry.telemetry,
148
152
  blob_path=DataSocket(
@@ -152,13 +156,11 @@ class UserTelemetryRecorder(Generic[TPayload, TResult], ABC):
152
156
  "telemetry_group=user",
153
157
  f"recorder_class={self.__class__.alias()}",
154
158
  telemetry.telemetry_path, # path join eliminates empty segments
155
- run_id,
159
+ serializer().get_output_name(output_name=run_id),
156
160
  ),
157
161
  data_format="null",
158
162
  ).parse_data_path(),
159
- serialization_format=self._serializer.get_serialization_format(
160
- telemetry.telemetry
161
- ),
163
+ serialization_format=serializer,
162
164
  overwrite=True,
163
165
  )
164
166
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: esd-services-api-client
3
- Version: 2.6.1a149.dev16
3
+ Version: 2.6.2
4
4
  Summary: Python clients for ESD services
5
5
  License: Apache 2.0
6
6
  Author: ECCO Sneaks & Data
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Provides-Extra: azure
15
15
  Provides-Extra: nexus
16
- Requires-Dist: adapta[datadog,storage] (>=3.3,<4.0)
16
+ Requires-Dist: adapta[datadog,storage] (>=3.4.1,<3.5.0)
17
17
  Requires-Dist: azure-identity (>=1.7,<1.8) ; extra == "azure"
18
18
  Requires-Dist: dataclasses-json (>=0.6.0,<0.7.0)
19
19
  Requires-Dist: httpx (>=0.27.0,<0.28.0) ; extra == "nexus"
@@ -1,5 +1,4 @@
1
- esd_services_api_client/__init__.py,sha256=4LskDwFuAFMOjHtN3_-71G_VZ4MNfjMJ7wX2cHYxV-0,648
2
- esd_services_api_client/_version.py,sha256=lzHqXFORcsluQ7ciI6_T8fZaZZjTt0NaAja2SmA6zF4,33
1
+ esd_services_api_client/__init__.py,sha256=sXHq53B-TfkrBLX-m7LBnobh8Yck629rCZOWaYopDjA,648
3
2
  esd_services_api_client/beast/__init__.py,sha256=zNhXcHSP5w4P9quM1XP4oXVJEccvC_VScG41TZ0GzZ8,723
4
3
  esd_services_api_client/beast/v3/__init__.py,sha256=FtumtInoDyCCRE424Llqv8QZLRuwXzj-smyfu1od1nc,754
5
4
  esd_services_api_client/beast/v3/_connector.py,sha256=VqxiCzJWKERh42aZAIphzmOEG5cdOcKM0DQzG7eQ_-8,11479
@@ -20,7 +19,7 @@ esd_services_api_client/nexus/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qo
20
19
  esd_services_api_client/nexus/abstractions/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qownTmNIRV0BB8,627
21
20
  esd_services_api_client/nexus/abstractions/algrorithm_cache.py,sha256=6GevJJ7mf1c_PImhKQ_4_6n652VyHlgK_12LNidirxs,3644
22
21
  esd_services_api_client/nexus/abstractions/input_object.py,sha256=RUKnhekuZwd_RVvnLGAxHa4wYDFJf6wEwWQI9f-o0lM,1761
23
- esd_services_api_client/nexus/abstractions/logger_factory.py,sha256=agkmveLTMwsDx5XdG9TNTEHaFi0leQF3MVSwOUn66os,3957
22
+ esd_services_api_client/nexus/abstractions/logger_factory.py,sha256=oJStrOPir8J18E3ALhUTCQrj3rbjo2yuYrnjpDwLQg8,3947
24
23
  esd_services_api_client/nexus/abstractions/nexus_object.py,sha256=rLE42imCVGE6Px4Yu6X6C4b69gA1grK-7Md_SuCLN2Q,3115
25
24
  esd_services_api_client/nexus/abstractions/socket_provider.py,sha256=Rwa_aPErI4Es5AdyCd3EoGze7mg2D70u8kuc2UGEBaI,1729
26
25
  esd_services_api_client/nexus/algorithms/__init__.py,sha256=v4rPDf36r6AaHi_3K8isBKYU_fG8ct3w14KpUg2XRgg,976
@@ -33,9 +32,9 @@ esd_services_api_client/nexus/algorithms/recursive.py,sha256=uaCCl4q-st_KqbcmkdO
33
32
  esd_services_api_client/nexus/configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
33
  esd_services_api_client/nexus/configurations/algorithm_configuration.py,sha256=eE7diX2PATCGkmqhvFOcZwXrr6vns4fqnJGmgNvhhZM,1091
35
34
  esd_services_api_client/nexus/core/__init__.py,sha256=sOgKKq3_LZGbLmQMtMS7lDw2hv027qownTmNIRV0BB8,627
36
- esd_services_api_client/nexus/core/app_core.py,sha256=eCqZJewfeM6Z7OVPl3ItJFkP_VPMCIoiL-3Xx-Zl9Mg,15053
35
+ esd_services_api_client/nexus/core/app_core.py,sha256=Lmkpq7Hy74EfMOi5vtjD82PpY7Lb84RVbXN5b82BxKs,15462
37
36
  esd_services_api_client/nexus/core/app_dependencies.py,sha256=1m7Oc9JCXyrU0qVZekYhpbXLQo20aQPQ-Bf8zEdjtqI,8704
38
- esd_services_api_client/nexus/core/serializers.py,sha256=Vk9FaEeDHXx3S7rPlYoWzsOcN6gzLzemsrjq6ytfaI0,2217
37
+ esd_services_api_client/nexus/core/serializers.py,sha256=0IfXadbR3G0mowqRQlIOP2LFjNs-P-Tr42Ia2G-ehtg,2275
39
38
  esd_services_api_client/nexus/exceptions/__init__.py,sha256=feN33VdqB5-2bD9aJesJl_OlsKrNNo3hZCnQgKuaU9k,696
40
39
  esd_services_api_client/nexus/exceptions/_nexus_error.py,sha256=QvtY38mNoIA6t26dUN6UIsaPfljhtVNsbQVS7ksMb-Q,895
41
40
  esd_services_api_client/nexus/exceptions/cache_errors.py,sha256=IO_rBQKXfIRHHXQuC8kAHejgZZw9yvSJk5BPYBnDYbc,1622
@@ -44,14 +43,14 @@ esd_services_api_client/nexus/exceptions/startup_error.py,sha256=4Hughi57Ndi_a8Y
44
43
  esd_services_api_client/nexus/input/__init__.py,sha256=ODYhZ791tPC4-eVxSRRlh8FLDDICU7nByLH7c4TD4Xc,758
45
44
  esd_services_api_client/nexus/input/input_processor.py,sha256=vqzeQrtRFqBKTPSEiWX_JZJTF9itMwwvWjPnJVLrSwQ,3132
46
45
  esd_services_api_client/nexus/input/input_reader.py,sha256=aXNMGxrdUX5RDYR666GSGkcZqYMFYoZ8zGVDuUFFFZQ,3505
47
- esd_services_api_client/nexus/input/payload_reader.py,sha256=Kq0xN1Shyqv71v6YkcrqVTDbmsEjZc8ithsXYpyu87M,2516
46
+ esd_services_api_client/nexus/input/payload_reader.py,sha256=rd0h-XAzI90h7KxB-XSn7J4NulH3hjRwhVxRtmlV_S8,2520
48
47
  esd_services_api_client/nexus/modules/__init__.py,sha256=Ngdc35K63JnK1197oyXXHEcSNZXdV4CXBWoviDUeR5U,839
49
48
  esd_services_api_client/nexus/modules/astra_client_module.py,sha256=L8OhdSc7-BY2lnJi4f7FGwCYeBbQqLLo0nBZErRoPgY,1983
50
49
  esd_services_api_client/nexus/modules/mlflow_module.py,sha256=d4y8XetGF37md4dEpEO0CFPj2lDmK_f6LspUm4dRAW4,1331
51
50
  esd_services_api_client/nexus/telemetry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
51
  esd_services_api_client/nexus/telemetry/recorder.py,sha256=-shxk2vYDTafJ0U3CzkHxIHBQtxVJ1ZNI4ST0p1YV2g,4801
53
- esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=NgnjSY64nEx1kslkdomENC6vMqkEOpfXggJXwm-NyFs,5163
54
- esd_services_api_client-2.6.1a149.dev16.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
55
- esd_services_api_client-2.6.1a149.dev16.dist-info/METADATA,sha256=MbvzM7gfqB2deZrKJyDW1zdGRrMCUWmbA1-a7dkCuAA,1068
56
- esd_services_api_client-2.6.1a149.dev16.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
57
- esd_services_api_client-2.6.1a149.dev16.dist-info/RECORD,,
52
+ esd_services_api_client/nexus/telemetry/user_telemetry_recorder.py,sha256=E4bj0N4QDo9kSxf1XMSplCfSG29iDKg-UgrRY-nq_XE,5225
53
+ esd_services_api_client-2.6.2.dist-info/LICENSE,sha256=0gS6zXsPp8qZhzi1xaGCIYPzb_0e8on7HCeFJe8fOpw,10693
54
+ esd_services_api_client-2.6.2.dist-info/METADATA,sha256=_07dZWH66-UP_h_ZEWnodx0f93DdEwmH03SVbLTWZu8,1062
55
+ esd_services_api_client-2.6.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
56
+ esd_services_api_client-2.6.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1 +0,0 @@
1
- __version__ = 'v2.6.1a149.dev16'