I have to admit that I'm not very familiar with the protocol buffers API
for Python, so hopefully someone more knowledgeable can chime in. But given
that Python does not have a message differencer, I think your best bet
would be to try to use the reflection API to implement something similar.
It should allow you to iterate over the fields for a particular message
type and check for differences between two protos. On this page
"Advanced Usage" there are some hints about how to do this.
On Thu, Sep 15, 2016 at 10:16 AM, Jordan Kaye <jordan.ka...@gmail.com>
> Hello all,
> I've been searching for the better part of a day without finding much
> information on this topic, so I figured I'd go ahead and ask here.
> I'm looking for a way to receive notifications of changes to individual
> Protobuf message instances. I have an application that would like to
> persist the changes of a message through time (event sourcing), and it
> would make things extremely clean if there were some way to accomplish this.
> If I were working in C++, it seems that there would at least be the
> possibility of using the message differencer for this (I could copy a
> message before applying some logic to it then run the differencer on the
> the copy and the message after the modification), but the code that I
> currently have is in Python.
> I understand that this is probably a very specific use case, but is there
> any way for me to achieve something like this?
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to firstname.lastname@example.org.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.