django_socio_grpc.proto_serializers
Module Contents
Classes
A read-write field that represents the target of the relationship by a unique ‘slug’ attribute. And support a type converter to be sure that the field is in the correct protobuf type |
Data
API
- django_socio_grpc.proto_serializers.LIST_PROTO_SERIALIZER_KWARGS
()
- class django_socio_grpc.proto_serializers.BaseProtoSerializer(*args, **kwargs)
Bases:
rest_framework.serializers.BaseSerializer- message_to_data(message)
Protobuf message -> Dict of python primitive datatypes.
- data_to_message(data)
Protobuf message <- Dict of python primitive datatypes.
- property message
- async asave(**kwargs)
- async ais_valid(*, raise_exception=False)
- async acreate(validated_data)
- async aupdate(instance, validated_data)
- property adata
- property amessage
- classmethod many_init(*args, **kwargs)
- abstract to_proto_message()
- class django_socio_grpc.proto_serializers.ProtoSerializer(*args, **kwargs)
Bases:
django_socio_grpc.proto_serializers.BaseProtoSerializer,rest_framework.serializers.Serializer
- class django_socio_grpc.proto_serializers.ListProtoSerializer(*args, **kwargs)
Bases:
rest_framework.serializers.ListSerializer,django_socio_grpc.proto_serializers.BaseProtoSerializer- message_to_data(message)
List of protobuf messages -> List of dicts of python primitive datatypes.
- data_to_message(data)
List of protobuf messages <- List of dicts of python primitive datatypes.
- class django_socio_grpc.proto_serializers.ModelProtoSerializer(*args, **kwargs)
Bases:
django_socio_grpc.proto_serializers.ProtoSerializer,rest_framework.serializers.ModelSerializer
- class django_socio_grpc.proto_serializers.BinaryField(**kwargs)
Bases:
rest_framework.serializers.FieldInitialization
- default_error_messages
None
- to_internal_value(data)
- to_representation(value)
- class django_socio_grpc.proto_serializers.SlugRelatedConvertedField(convert_type=None, **kwargs)
Bases:
rest_framework.relations.SlugRelatedFieldA read-write field that represents the target of the relationship by a unique ‘slug’ attribute. And support a type converter to be sure that the field is in the correct protobuf type
Initialization
- to_representation(obj)