Package pyamf :: Module amf0
[hide private]
[frames] | no frames]

Module amf0

source code

AMF0 implementation.

AMF0 supports the basic data types used for the NetConnection, NetStream, LocalConnection, SharedObjects and other classes in the Flash Player.


See Also:
Official AMF0 Specification in English (external), Official AMF0 Specification in Japanese (external), AMF documentation on OSFlash (external)
Authors:
Arnar Birgisson, Thijs Triemstra, Nick Joyce

Since: 0.1.0

Classes [hide private]
  ASTypes
The AMF/RTMP data encoding format constants.
  Context
I hold the AMF0 context for en/decoding streams.
  Decoder
Decodes an AMF0 stream.
  Encoder
Encodes an AMF0 stream.
  RecordSet
I represent the RecordSet class used in Flash Remoting to hold (amongst other things) SQL records.
Functions [hide private]
 
decode(stream, context=None)
A helper function to decode an AMF0 datastream.
source code
StringIO
encode(*args, **kwargs)
A helper function to encode an element into the AMF0 format.
source code
 
check_nan(func) source code
 
_check_for_int(x)
This is a compatibility function that takes a float and converts it to an int if the values are equal.
source code
Variables [hide private]
  ACTIONSCRIPT_TYPES = [8, 15, 6, 2, 7, 14, 16, 3, 0, 13, 12, 17...
List of available ActionScript types in AMF0.

Imports: datetime, types, pyamf, util


Function Details [hide private]

decode(stream, context=None)

source code 

A helper function to decode an AMF0 datastream.

Parameters:

encode(*args, **kwargs)

source code 

A helper function to encode an element into the AMF0 format.

Parameters:
  • element (mixed) - The element to encode
  • context (Context) - AMF0 Context to use for the encoding. This holds previously referenced objects etc.
Returns: StringIO
The encoded stream.

Variables Details [hide private]

ACTIONSCRIPT_TYPES

List of available ActionScript types in AMF0.

Value:
[8, 15, 6, 2, 7, 14, 16, 3, 0, 13, 12, 17, 1, 9, 11, 10, 5, 4]