buz 2.17.0rc6__py3-none-any.whl → 2.17.0rc7__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.
- buz/kafka/infrastructure/cdc/cdc_payload.py +3 -3
- buz/kafka/infrastructure/cdc/cdc_schema.py +1 -1
- buz/kafka/infrastructure/deserializers/implementations/cdc/cdc_record_bytes_to_event_deserializer.py +4 -4
- buz/kafka/infrastructure/serializers/implementations/cdc_record_bytes_to_event_serializer.py +2 -2
- {buz-2.17.0rc6.dist-info → buz-2.17.0rc7.dist-info}/METADATA +1 -1
- {buz-2.17.0rc6.dist-info → buz-2.17.0rc7.dist-info}/RECORD +8 -8
- {buz-2.17.0rc6.dist-info → buz-2.17.0rc7.dist-info}/LICENSE +0 -0
- {buz-2.17.0rc6.dist-info → buz-2.17.0rc7.dist-info}/WHEEL +0 -0
|
@@ -10,7 +10,7 @@ class CDCPayload:
|
|
|
10
10
|
event_id: str # uuid
|
|
11
11
|
created_at: str
|
|
12
12
|
event_fqn: str
|
|
13
|
-
|
|
13
|
+
metadata: Optional[str] = None # json encoded
|
|
14
14
|
|
|
15
15
|
def validate(self) -> None:
|
|
16
16
|
if not isinstance(self.payload, str):
|
|
@@ -21,8 +21,8 @@ class CDCPayload:
|
|
|
21
21
|
raise ValueError("The created_at value is not a value")
|
|
22
22
|
if not isinstance(self.event_fqn, str):
|
|
23
23
|
raise ValueError("The event_fqn value is not a valid value")
|
|
24
|
-
if self.
|
|
25
|
-
raise ValueError("The
|
|
24
|
+
if self.metadata is not None and not isinstance(self.metadata, str):
|
|
25
|
+
raise ValueError("The metadata value is not a valid value")
|
|
26
26
|
|
|
27
27
|
def __post_init__(self) -> None:
|
|
28
28
|
self.validate()
|
buz/kafka/infrastructure/deserializers/implementations/cdc/cdc_record_bytes_to_event_deserializer.py
CHANGED
|
@@ -29,7 +29,7 @@ class CDCRecordBytesToEventDeserializer(BytesToMessageDeserializer[Event], Gener
|
|
|
29
29
|
return self.__event_class.restore(
|
|
30
30
|
id=cdc_payload.event_id,
|
|
31
31
|
created_at=self.__get_created_at_in_event_format(cdc_payload.created_at),
|
|
32
|
-
metadata=self.
|
|
32
|
+
metadata=self.__deserialize_metadata(cdc_payload.metadata),
|
|
33
33
|
**orjson.loads(cdc_payload.payload),
|
|
34
34
|
)
|
|
35
35
|
except Exception as exception:
|
|
@@ -49,7 +49,7 @@ class CDCRecordBytesToEventDeserializer(BytesToMessageDeserializer[Event], Gener
|
|
|
49
49
|
|
|
50
50
|
return from_dict(CDCPayload, payload)
|
|
51
51
|
|
|
52
|
-
def
|
|
53
|
-
if
|
|
52
|
+
def __deserialize_metadata(self, metadata: Optional[str]) -> dict:
|
|
53
|
+
if metadata is None:
|
|
54
54
|
return {}
|
|
55
|
-
return orjson.loads(
|
|
55
|
+
return orjson.loads(metadata)
|
buz/kafka/infrastructure/serializers/implementations/cdc_record_bytes_to_event_serializer.py
CHANGED
|
@@ -22,7 +22,7 @@ class CDCRecordBytesToEventSerializer(ByteSerializer):
|
|
|
22
22
|
created_at=self.__adapt_created_to_cdc_format(data.created_at),
|
|
23
23
|
event_fqn=data.fqn(),
|
|
24
24
|
payload=self.__serialize_payload(data),
|
|
25
|
-
|
|
25
|
+
metadata=self.__serialize_metadata(data),
|
|
26
26
|
),
|
|
27
27
|
schema=generate_cdc_schema(data),
|
|
28
28
|
)
|
|
@@ -39,5 +39,5 @@ class CDCRecordBytesToEventSerializer(ByteSerializer):
|
|
|
39
39
|
del payload["metadata"]
|
|
40
40
|
return self.__json_serializer.serialize_as_json(payload)
|
|
41
41
|
|
|
42
|
-
def
|
|
42
|
+
def __serialize_metadata(self, event: Event) -> Optional[str]:
|
|
43
43
|
return self.__json_serializer.serialize_as_json(event.metadata) # type: ignore[arg-type]
|
|
@@ -179,13 +179,13 @@ buz/kafka/infrastructure/aiokafka/translators/__init__.py,sha256=47DEQpj8HBSa-_T
|
|
|
179
179
|
buz/kafka/infrastructure/aiokafka/translators/consumer_initial_offset_position_translator.py,sha256=WmxkQfoXeTy9mIJtGGhM0eDKeQxhcJczeVAGCbtonVI,617
|
|
180
180
|
buz/kafka/infrastructure/cdc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
buz/kafka/infrastructure/cdc/cdc_message.py,sha256=Cpv2nA19SG3HZGBLH-wIJbuokzTTZKT_HNFm1VwGSk4,585
|
|
182
|
-
buz/kafka/infrastructure/cdc/cdc_payload.py,sha256=
|
|
183
|
-
buz/kafka/infrastructure/cdc/cdc_schema.py,sha256=
|
|
182
|
+
buz/kafka/infrastructure/cdc/cdc_payload.py,sha256=_kC80bX0HBMPwjeJy5HpPe1EmHVmVEe2Slut7Ucrpfk,1021
|
|
183
|
+
buz/kafka/infrastructure/cdc/cdc_schema.py,sha256=mCG32kqJ045nThViM8zUjUzdIf0VtASIlqxCHA5SsGQ,1153
|
|
184
184
|
buz/kafka/infrastructure/deserializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
185
185
|
buz/kafka/infrastructure/deserializers/byte_deserializer.py,sha256=4fc6t-zvcFx6F5eoyEixH2uN0cM6aB0YRGwowIzz1RA,211
|
|
186
186
|
buz/kafka/infrastructure/deserializers/bytes_to_message_deserializer.py,sha256=r40yq67DIElPi6ClmElbtR3VGrG2grNwgwuflXWOh20,345
|
|
187
187
|
buz/kafka/infrastructure/deserializers/implementations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
|
-
buz/kafka/infrastructure/deserializers/implementations/cdc/cdc_record_bytes_to_event_deserializer.py,sha256=
|
|
188
|
+
buz/kafka/infrastructure/deserializers/implementations/cdc/cdc_record_bytes_to_event_deserializer.py,sha256=zEP7mfJfZXapG7xyJj_BvGR-GtTOZEUYweHgvNRzEYE,2160
|
|
189
189
|
buz/kafka/infrastructure/deserializers/implementations/cdc/not_valid_cdc_message_exception.py,sha256=hgLLwTcC-C2DuJSOWUhmQsrd1bO9I1469869IqfAPOk,414
|
|
190
190
|
buz/kafka/infrastructure/deserializers/implementations/json_byte_deserializer.py,sha256=L4b164-KweiQUwyRONhTMIGnAz48UPk0btLqjGOTNdk,373
|
|
191
191
|
buz/kafka/infrastructure/deserializers/implementations/json_bytes_to_message_deserializer.py,sha256=YwugXkmOudMNtkVfCC4BFe3pFVpbM8rAL9bT88bZMRk,756
|
|
@@ -200,7 +200,7 @@ buz/kafka/infrastructure/kafka_python/kafka_python_producer.py,sha256=DkqqLSSXHB
|
|
|
200
200
|
buz/kafka/infrastructure/kafka_python/translators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
201
201
|
buz/kafka/infrastructure/kafka_python/translators/consumer_initial_offset_position_translator.py,sha256=hJ48_eyMcnbFL_Y5TOiMbGXrQSryuKk9CvP59MdqNOY,620
|
|
202
202
|
buz/kafka/infrastructure/serializers/byte_serializer.py,sha256=T83sLdX9V5Oh1mzjRwHi_1DsTFI7KefFj7kmnz7JVy4,207
|
|
203
|
-
buz/kafka/infrastructure/serializers/implementations/cdc_record_bytes_to_event_serializer.py,sha256=
|
|
203
|
+
buz/kafka/infrastructure/serializers/implementations/cdc_record_bytes_to_event_serializer.py,sha256=c5VmnuTOIZJ_tjfOl_BQnPdr7D1OAOxGYVFE4O4X8Tk,1801
|
|
204
204
|
buz/kafka/infrastructure/serializers/implementations/json_byte_serializer.py,sha256=yCPlZ-TNoF5Jh0WUlhseC8rTnHk-IJgmAHmU58ninyA,1523
|
|
205
205
|
buz/kafka/infrastructure/serializers/kafka_header_serializer.py,sha256=ws9xr5lsJF6J-uVIplPym7vboo00KtXHfLJf8JjG0lo,649
|
|
206
206
|
buz/locator/__init__.py,sha256=my8qfHL5htIT9RFFjzV4zGIPVW72tu4SMQbKKqBeSKo,293
|
|
@@ -258,7 +258,7 @@ buz/serializer/message_to_json_bytes_serializer.py,sha256=RGZJ64t4t4Pz2FCASZZCv-
|
|
|
258
258
|
buz/wrapper/__init__.py,sha256=GnRdJFcncn-qp0hzDG9dBHLmTJSbHFVjE_yr-MdW_n4,77
|
|
259
259
|
buz/wrapper/async_to_sync.py,sha256=OfK-vrVUhuN-LLLvekLdMbQYtH0ue5lfbvuasj6ovMI,698
|
|
260
260
|
buz/wrapper/event_loop.py,sha256=pfBJ1g-8A2a3YgW8Gf9Fg0kkewoh3-wgTy2KIFDyfHk,266
|
|
261
|
-
buz-2.17.
|
|
262
|
-
buz-2.17.
|
|
263
|
-
buz-2.17.
|
|
264
|
-
buz-2.17.
|
|
261
|
+
buz-2.17.0rc7.dist-info/LICENSE,sha256=jcLgcIIVaBqaZNwe0kzGWSU99YgwMcI0IGv142wkYSM,1062
|
|
262
|
+
buz-2.17.0rc7.dist-info/METADATA,sha256=tD8AIOQCaOpePJRAC_5jkpTshFpvkkLjoALYUaFbJ7Q,12583
|
|
263
|
+
buz-2.17.0rc7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
264
|
+
buz-2.17.0rc7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|