معرفی شرکت ها


faust-avro-serializer-1.1.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Faust serializer that serializes Avro compatible messages
ویژگی مقدار
سیستم عامل -
نام فایل faust-avro-serializer-1.1.0
نام faust-avro-serializer
نسخه کتابخانه 1.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده bakdata
ایمیل نویسنده info@bakdata.com
آدرس صفحه اصلی https://github.com/bakdata/faust-avro-serializer
آدرس اینترنتی https://pypi.org/project/faust-avro-serializer/
مجوز -
# faust-avro-serializer This repo contains an improved version of the avro serializer from https://github.com/marcosschroh/python-schema-registry-client/. It expects the schema to be stored in the record itself in order to mimic the behavior of Confluent's Avro SerDe. It uses Faust's [metadata](https://faust.readthedocs.io/en/latest/userguide/models.html#polymorphic-fields) capability inside the ``Record`` class to read the Avro schema dynamically. ### Example ```python from faust import Record, Schema, Stream from faust_avro_serializer import FaustAvroSerializer from schema_registry.client import SchemaRegistryClient import faust app = faust.App('myapp', broker='kafka://localhost') my_topic_name = "my-dummy-topic" class MyRecordExample(Record): _schema = { "type": "record", "namespace": "com.example", "name": "MyRecordExample", "fields": [ { "name": "foo", "type": "string" }, { "name": "bar", "type": "string" } ] } foo: str bar: str client = SchemaRegistryClient("http://my-schema-registry:8081") serializer = FaustAvroSerializer(client, my_topic_name, False) schema_with_avro = Schema(key_serializer=str, value_serializer=serializer) dummy_topic = app.topic(my_topic_name, schema=schema_with_avro) @app.agents(dummy_topic) async def my_agent(myrecord: Stream[MyRecordExample]): async for record in myrecord: print(record.to_representation()) ``` When the serializer calls the ``_dumps`` method, it searches for the ``__faust`` field inside the record. If the serializer finds the field, it is resolving the class and reads the ``_schema`` field containing the Avro schema.


نیازمندی

مقدار نام
- python-schema-registry-client==1.8.2
- faust-streaming
- bump2version
- pytest
- pytest-cov


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl faust-avro-serializer-1.1.0:

    pip install faust-avro-serializer-1.1.0.whl


نصب پکیج tar.gz faust-avro-serializer-1.1.0:

    pip install faust-avro-serializer-1.1.0.tar.gz