Module Expr Str Import alias Import alias Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad orelse TryExcept body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body For NameStore NameLoad body Expr Call NameLoad Call AttributeLoad Call NameLoad NameLoad AttributeLoad NameLoad attr attr NameLoad orelse TryExcept body For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Return If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num If BoolOpAnd CompareGt Call NameLoad NameLoad Num Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore DictComp Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore SubscriptLoad NameLoad Slice Num orelse Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Num Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body If CompareIs NameLoad NameLoad body Continue TryExcept body Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad handlers ExceptHandler type NameLoad body If CompareNotIn NameLoad ListLoad ListLoad Str Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Continue If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A Decoder and encoder for the pblite format.

pblite (sometimes also known as protojson) is a format for serializing Protocol
Buffers into JavaScript objects. Messages are represented as arrays where the
tag number of a value is given by its position in the array.

Methods in this module assume encoding/decoding to JavaScript strings is done
separately.

Google's implementation for JavaScript is available in closure-library:
    https://github.com/google/closure-library/tree/master/closure/goog/proto2
 N/A base64 N/A itertools N/A logging google.protobuf.descriptor FieldDescriptor N/A logger N/A N/A logging getLogger __name__ _decode_field N/A N/A message field value N/A N/A N/A Decode optional or required field. N/A N/A N/A field type N/A FieldDescriptor TYPE_MESSAGE N/A N/A N/A decode N/A getattr message N/A field name value N/A N/A N/A N/A N/A N/A field type N/A FieldDescriptor TYPE_BYTES N/A N/A value N/A N/A base64 b64decode value N/A N/A setattr message N/A field name value N/A N/A N/A N/A ValueError TypeError N/A e N/A N/A N/A N/A logger warning Message %r ignoring field %s: %s N/A N/A message __class__ __name__ N/A field name e N/A _decode_repeated_field N/A N/A message field value_list N/A N/A N/A Decode repeated field. N/A N/A N/A field type N/A FieldDescriptor TYPE_MESSAGE N/A N/A value value_list N/A N/A N/A decode N/A N/A N/A getattr message N/A field name add value N/A N/A N/A N/A value value_list N/A N/A N/A N/A field type N/A FieldDescriptor TYPE_BYTES N/A N/A value N/A N/A base64 b64decode value N/A N/A N/A N/A getattr message N/A field name append value N/A N/A N/A N/A ValueError TypeError N/A e N/A N/A N/A N/A logger warning Message %r ignoring repeated field %s: %s N/A N/A message __class__ __name__ N/A field name e N/A N/A N/A message ClearField N/A field name N/A decode N/A N/A message pblite ignore_first_item N/A False N/A N/A Decode pblite to Protocol Buffer message.

    This method is permissive of decoding errors and will log them as warnings
    and continue decoding where possible.

    The first element of the outer pblite list must often be ignored using the
    ignore_first_item parameter because it contains an abbreviation of the name
    of the protobuf message (eg.  cscmrp for ClientSendChatMessageResponseP)
    that's not part of the protobuf.

    Args:
        message: protocol buffer message instance to decode into.
        pblite: list representing a pblite-serialized message.
        ignore_first_item: If True, ignore the item at index 0 in the pblite
            list, making the item at index 1 correspond to field 1 in the
            message.
     N/A N/A N/A isinstance pblite list N/A N/A N/A N/A logger warning Ignoring invalid message: expected list, got %r N/A type pblite N/A N/A ignore_first_item N/A N/A pblite N/A pblite N/A 1 N/A N/A N/A N/A len pblite 0 N/A isinstance N/A pblite N/A -1 dict N/A N/A extra_fields N/A N/A int field_number value N/A N/A field_number value N/A N/A N/A pblite N/A -1 items N/A pblite N/A pblite N/A -1 N/A N/A extra_fields N/A N/A fields_values N/A N/A itertools chain N/A enumerate pblite start 1 N/A N/A extra_fields items N/A N/A field_number value fields_values N/A N/A N/A value None N/A N/A N/A N/A N/A field N/A N/A N/A message DESCRIPTOR fields_by_number N/A field_number N/A N/A N/A KeyError N/A N/A N/A value N/A N/A 0 N/A N/A N/A N/A logger debug Message %r contains unknown field %s with value %r N/A N/A message __class__ __name__ field_number value N/A N/A N/A N/A field label N/A FieldDescriptor LABEL_REPEATED N/A N/A N/A _decode_repeated_field message field value N/A N/A N/A _decode_field message field value N/A