Crypto Kafka Serialize Python Library
kser-crypto的Python项目详细描述
kser加密
Kser模块允许您使用libsodium加密和解密kafka中的消息。
示例
确保定义了环境变量kser_secretbox_key。
消费者
fromkser_crypto.python_kafka.consumerimportCryptoConsumerconsumer=CryptoConsumer(config=dict(...),topics=[...])consumer.run()
制作人
importtimefromuuidimportuuid4fromkser.schemasimportMessagefromkser_crypto.python_kafka.producerimportCryptoProducerproducer=CryptoProducer(config=dict(...))producer.send("test",Message(uuid=str(uuid4()),entrypoint="myTest"))time.sleep(1)
要求
- python 3.x
- 锂钠
文件
许可证
根据麻省理工学院许可证(LICENSE或http://opensource.org/licenses/MIT)授权