Skip to content

Commit

Permalink
build: Split avro, json, msgpack into separate modules (#176)
Browse files Browse the repository at this point in the history
So it is possible to import use each of the codecs independently without including all of the optional dependencies.
  • Loading branch information
lynnagara committed Jan 23, 2023
1 parent ff5c88d commit 0035f28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions arroyo/processing/strategies/decoder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
from arroyo.processing.strategies.decoder.avro import AvroCodec
from arroyo.processing.strategies.decoder import avro, json, msgpack
from arroyo.processing.strategies.decoder.base import (
Codec,
DecodedKafkaMessage,
KafkaMessageDecoder,
ValidationError,
)
from arroyo.processing.strategies.decoder.json import JsonCodec
from arroyo.processing.strategies.decoder.msgpack import MsgpackCodec

__all__ = [
"AvroCodec",
"avro",
"json",
"msgpack",
"Codec",
"DecodedKafkaMessage",
"JsonCodec",
"KafkaMessageDecoder",
"MsgpackCodec",
"ValidationError",
]
6 changes: 3 additions & 3 deletions tests/processing/strategies/test_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

from arroyo.backends.kafka import KafkaPayload
from arroyo.processing.strategies.decoder import (
AvroCodec,
DecodedKafkaMessage,
JsonCodec,
KafkaMessageDecoder,
MsgpackCodec,
ValidationError,
)
from arroyo.processing.strategies.decoder.avro import AvroCodec
from arroyo.processing.strategies.decoder.json import JsonCodec
from arroyo.processing.strategies.decoder.msgpack import MsgpackCodec
from arroyo.types import Message, Partition, Topic, Value


Expand Down

0 comments on commit 0035f28

Please sign in to comment.