Package pyamf :: Module codec :: Class Encoder
[hide private]
[frames] | no frames]

Class Encoder

source code


Base AMF encoder.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_write_type(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeNull(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeBytes(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeString(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeBoolean(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeNumber(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeList(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeUndefined(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeDate(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeXML(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeObject(self, obj, **kwargs)
Subclasses should override this and all write[type] functions
source code
 
writeSequence(self, iterable)
Encodes an iterable.
source code
 
writeGenerator(self, gen)
Iterates over a generator object and encodes all that is returned.
source code
 
getTypeFunc(self, data)
Returns a callable that will encode data to self.stream.
source code
 
writeElement(self, data)
Encodes data to AMF.
source code
 
send(self, element) source code
 
next(self) source code
 
__iter__(self) source code

Inherited from _Codec: buildContext

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from _Codec: context, stream, strict, timezone_offset

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

writeSequence(self, iterable)

source code 

Encodes an iterable. The default is to write If the iterable has an al

getTypeFunc(self, data)

source code 

Returns a callable that will encode data to self.stream. If data is unencodable, then None is returned.

Overrides: _Codec.getTypeFunc

writeElement(self, data)

source code 

Encodes data to AMF. If the data is not able to be matched to an AMF type, then pyamf.EncodeError will be raised.