wotpy.codecs.text

Class that implements the text codec.

Classes

TextCodec Text codec class.
class wotpy.codecs.text.TextCodec

Bases: wotpy.codecs.base.BaseCodec

Text codec class.

media_types

Returns the text media types.

to_bytes(value)

Takes an unicode string and encodes it to an UTF8 bytes string.

to_value(value)

Takes an encoded value from a request that may be a UTF8 bytes or unicode string and decodes it to an unicode string.