Answer the question
In order to leave comments, you need to log in
How to deserialize data with Google Protobuf in Python 3?
I searched on the Internet, but Google does not have an up-to-date example, or I'm installing something wrong. The fact that they import it does not find it.
I installed pip install protobuf
https://pypi.org/project/protobuf/
And I looked at the information on the Google website
https://developers.google.com/protocol-buffers/doc...
Maybe someone came across how this data was deserialized?
Answer the question
In order to leave comments, you need to log in
Do I understand correctly that it is necessary to decrypt the protobuf binary message without using the .proto scheme? If yes, then there is a good tool https://github.com/nevermoe/protobuf_decoder
Using the official library means generating py-files with the necessary classes, based on which deserialization will take place. Example from their page:
protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/addressbook.proto
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question