Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

For C++, I found the 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. Any suggestions what I can use?

Thanks

like image 594
radschapur Avatar asked Mar 02 '26 05:03

radschapur


1 Answers

I don't think anything exists. You can probably wrap the C++ implementation in python using CLIF or something similar.

I implemented a version myself (with only basic set of features) in https://github.com/dayfine/proto-matcher

like image 98
dayfine Avatar answered Mar 03 '26 17:03

dayfine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!