wotpy.codecs.base
Class that represents the codec interface.
Classes
Base codec abstract class. |
- class wotpy.codecs.base.BaseCodec
Bases:
objectBase codec abstract class. All codecs must implement this interface.
- property media_types
Property getter for the supported media types of this codec.
- to_bytes(value)
Takes a Python object and encodes it to an UTF8 bytes string to be included in a response.
- to_value(value)
Takes an encoded value from a request that may be an UTF8 bytes or unicode string and decodes it to a Python object.