Skip to content

Python Dictionary to Class Handling (How/Why) #1100

Open
@slominskir

Description

@slominskir

Description

Is there any discussion on how to handle serde transformation from a Python Dictionary to a Class? The Consumer API for example currently accepts a callable function from_dict and is demonstrated in the examples.

This appears to preclude using a generator such as avro-gen, since it apparently simply wraps the Dictionary instead of transform it and toss it out as is done with from_dict. Maybe avro_gen wrapping is a bad approach? Maybe classes aren't "Pythonic" anyways? Just trying to figure out how best to use the confluent_kafka_python API in my own code and figure someone has already thought about this.

How to reproduce

This is an API / Documentation question.

Checklist

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionA question about how to use or about expected behavior of the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions