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

Module amf3

source code

AMF3 implementation.

AMF3 is the default serialization for ActionScript 3.0 and provides various advantages over AMF0, which is used for ActionScript 1.0 and 2.0. It adds support for sending int and uint objects as integers and supports data types that are available only in ActionScript 3.0, such as ByteArray and ArrayCollection.


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

Since: 0.1.0

Classes [hide private]
  ASTypes
All AMF3 data types used in ActionScript 3.0.
  ObjectEncoding
AMF object encodings.
  DataOutput
I am a StringIO type object containing byte data from the AMF stream.
  DataInput
I provide a set of methods for reading binary data with ActionScript 3.0.
  ByteArray
I am a StringIO type object containing byte data from the AMF stream.
  ClassDefinition
I contain meta relating to the class definition.
  Context
I hold the AMF3 context for en/decoding streams.
  Decoder
Decodes an AMF3 data stream.
  Encoder
Encodes an AMF3 data stream.
Functions [hide private]
 
decode(stream, context=None)
A helper function to decode an AMF3 datastream.
source code
util.BufferedByteStream
encode(*args, **kwargs)
A helper function to encode an element into AMF3 format.
source code
 
_encode_int(n) source code
Variables [hide private]
  ACTIONSCRIPT_TYPES = [7, 12, 0, 2, 10, 5, 3, 8, 4, 9, 1, 11, 6]
List of available ActionScript types in AMF3.
  REFERENCE_BIT = 1
Reference bit.

Imports: types, datetime, zlib, pyamf, util, set


Function Details [hide private]

decode(stream, context=None)

source code 

A helper function to decode an AMF3 datastream.

Parameters:

encode(*args, **kwargs)

source code 

A helper function to encode an element into AMF3 format.

Parameters:
  • context (Context) - Any initial context to use.
  • args (List of args to encode.)
Returns: util.BufferedByteStream
StringIO type object containing the encoded AMF3 data.