Esempio n. 1
0
 def __init__(self, cls, serializer_provider: SerializerProvider,
              parser_provider: ParserProvider):
     self.cls = cls
     apply_defaults(cls)
     self.serializer_provider = serializer_provider
     self.parser_provider = parser_provider
     self.type_info = get_cls_attr(cls, PYCKSON_TYPEINFO, dict())
     self.name_rule = get_name_rule(cls)
Esempio n. 2
0
 def class_decorator(cls):
     name_function = name_by_dict(kwargs, get_name_rule(cls))
     set_cls_attr(cls, PYCKSON_NAMERULE, name_function)
     return cls
Esempio n. 3
0
 def __init__(self, cls, serializer_provider: SerializerProvider, parser_provider: ParserProvider):
     self.cls = cls
     self.serializer_provider = serializer_provider
     self.parser_provider = parser_provider
     self.type_info = getattr(cls, PYCKSON_TYPEINFO, dict())
     self.name_rule = get_name_rule(cls)
Esempio n. 4
0
 def class_decorator(cls):
     name_function = name_by_dict(kwargs, get_name_rule(cls))
     setattr(cls, PYCKSON_NAMERULE, name_function)
     return cls