– If set, a colon will be added after the field name even if the field is a proto message. 

` google.protobuf.text_format. ` ` PrintField ` (  _field_ , _value_ , _out_ ,
_indent=0_ , _as_utf8=False_ , _as_one_line=False_ ,
_use_short_repeated_primitives=False_ , _pointy_brackets=False_ ,
_use_index_order=False_ , _float_format=None_ , _double_format=None_ ,
_message_formatter=None_ , _print_unknown_fields=False_ , _force_colon=False_
)  ¶

    

Print a single field name/value pair.

` google.protobuf.text_format. ` ` PrintFieldValue ` (  _field_ , _value_ ,
_out_ , _indent=0_ , _as_utf8=False_ , _as_one_line=False_ ,
_use_short_repeated_primitives=False_ , _pointy_brackets=False_ ,
_use_index_order=False_ , _float_format=None_ , _double_format=None_ ,
_message_formatter=None_ , _print_unknown_fields=False_ , _force_colon=False_
)  ¶

    

Print a single field value (not including name).

` google.protobuf.text_format. ` ` Merge ` (  _text_ , _message_ ,
_allow_unknown_extension=False_ , _allow_field_number=False_ ,
_descriptor_pool=None_ , _allow_unknown_field=False_ )  ¶

    

Parses a text representation of a protocol message into a message.

Like Parse(), but allows repeated values for a non-repeated field, and uses
the last one. This means any non-repeated, top-level fields specified in text
replace those in the message.

Parameters  :

    

  * **text** ( [ _str_ ](https://docs.python.org/3/library/stdtypes.html#str "\(in Python v3.10\)") ) – Message text representation. 

  * **message** ( [ _Message_ ](message.html#google.protobuf.message.Message "google.protobuf.message.Message") ) – A protocol buffer message to merge into. 

  * **allow_unknown_extension** – if True, skip over missing extensions and keep parsing 

  * **allow_field_number** – if True, both field number and field name are allowed. 

  * **descriptor_pool** ( [ _DescriptorPool_ ](descriptor_pool.html#google.protobuf.descriptor_pool.DescriptorPool "google.protobuf.descriptor_pool.DescriptorPool") ) – Descriptor pool used to resolve Any types. 

  * **allow_unknown_field** – if True, skip over unknown field and keep parsing. Avoid to use this option if possible. It may hide some errors (e.g. spelling error on field name) 

Returns  :

    

The same message passed as argument.

Return type  :

    

[ Message ](message.html#google.protobuf.message.Message
"google.protobuf.message.Message")

Raises  :

    

[ **ParseError** ](json_format.html#google.protobuf.json_format.ParseError
"google.protobuf.json_format.ParseError") – On text parsing problems.

` google.protobuf.text_format. ` ` MessageToBytes ` (  _message_ , _**kwargs_
)  ¶

    

Convert protobuf message to encoded text format. See MessageToString.

###  [ Table of Contents ](../../index.html)

  * [ google.protobuf ](../protobuf.html)
  * [ google.protobuf.any_pb2 ](any_pb2.html)
  * [ google.protobuf.descriptor ](descriptor.html)
  * [ google.protobuf.descriptor_database ](descriptor_database.html)
  * [ google.protobuf.descriptor_pb2 ](descriptor_pb2.html)
  * [ google.protobuf.descriptor_pool ](descriptor_pool.html)
  * [ google.protobuf.duration_pb2 ](duration_pb2.html)
  * [ google.protobuf.empty_pb2 ](empty_pb2.html)
  * [ google.protobuf.field_mask_pb2 ](field_mask_pb2.html)
  * [ google.protobuf.internal.containers ](internal/containers.html)
  * [ google.protobuf.json_format ](json_format.html)
  * [ google.protobuf.message ](message.html)
  * [ google.protobuf.message_factory ](message_factory.html)
  * [ google.protobuf.proto_builder ](proto_builder.html)
  * [ google.protobuf.reflection ](reflection.html)
  * [ google.protobuf.service ](service.html)
  * [ google.protobuf.service_reflection ](service_reflection.html)
  * [ google.protobuf.struct_pb2 ](struct_pb2.html)
  * [ google.protobuf.symbol_database ](symbol_database.html)
  * [ google.protobuf.text_encoding ](text_encoding.html)
  * google.protobuf.text_format 
  * [ google.protobuf.timestamp_pb2 ](timestamp_pb2.html)