Module message_factory
source code
Provides a factory class for generating dynamic messages.
The easiest way to use this class is if you have access to the
FileDescriptor protos containing the messages you want to create you can
just do the following:
message_classes =
message_factory.GetMessages(iterable_of_file_descriptors)
my_proto_instance =
message_classes['some.proto.package.MessageName']()
Author:
matthewtoia@google.com (Matt Toia)
|
MessageFactory
Factory for creating Proto2 messages from descriptors in a pool.
|
|
_FACTORY = <google.protobuf.message_factory.MessageFactory obj...
|
|
__package__ = ' google.protobuf '
|
Builds a dictionary of all the messages available in a set of files.
Args:
file_protos: Iterable of FileDescriptorProto to build messages out of.
Returns:
A dictionary mapping proto names to the message classes. This will include
any dependent messages as well as any messages defined in the same file as
a specified message.
|
_FACTORY
- Value:
<google.protobuf.message_factory.MessageFactory object>
|
|