简体   繁体   English

C++ protobuf消息差分器的Python等价

[英]Python equivalence of C++ protobuf message differencer

I am trying to compare two protobuf messages in Python for equality, ignoring the order elements in lists and so on.我试图比较 Python 中的两个 protobuf 消息是否相等,忽略列表中的 order 元素等等。

For C++, I found the MessageDifferencer ( https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.util.message_differencer )对于 C++,我找到了 MessageDifferencer ( https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.util.message_differencer )

Now I'm looking for something similar in Python, but can't really find anything.现在我在 Python 中寻找类似的东西,但真的找不到任何东西。 Any suggestions what I can use?我可以使用什么建议?

Thanks谢谢

I don't think anything exists.我认为什么都不存在。 You can probably wrap the C++ implementation in python using CLIF or something similar.您可能可以使用CLIF或类似的东西在 python 中包装 C++ 实现。

I implemented a version myself (with only basic set of features) in https://github.com/dayfine/proto-matcher我在https://github.com/dayfine/proto-matcher 中自己实现了一个版本(只有基本的功能集)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM