There's no built-in byte-array serializer/deserializer for Python, but it's not hard to implement. If, for instance, you want to convert a string to its underlying hexadecimal representation in your producer you can implement it this way:
KafkaProducer(value_serializer=lambda v: binascii.hexlify(v.encode('utf-8')))
If, on the other hand, you had incoming bytes in your consumer and wanted to convert them into their string representation, you could do it like this.
KafkaConsumer(value_deserializer=lambda v: binascii.unhexlify(a).decode('utf-8'))
Answers are for Python 3+.