In Python, is it possible at run time to convert a Google Protocol Buffers .proto
file into a python class that reads that data? Python is a very dynamic language. When you use protoc
to convert a .proto
file to python source code, the generated code makes a lot of use of python metaclasses, so it's already very dynamic.
Ideally, I'm thinking of something like this:
import whatever
module = whatever.load_from_file("myfile.proto")
Is this possible?
(I am new to protocol buffers, please let me know if my question makes no sense)