| Home | Trees | Indices | Help |
|
|---|
|
|
PyAMF provides Action Message Format (AMF) support for Python that is compatible with the Adobe Flash Player.
Since: October 2007
Status: Production/Stable
|
|||
| |||
|
|||
|
ASObject Represents a Flash Actionscript Object (typed or untyped). |
|||
|
BaseError Base AMF Error. |
|||
|
DecodeError Raised if there is an error in decoding an AMF data stream. |
|||
|
EOStream Raised if the data stream has come to a natural end. |
|||
|
EncodeError Raised if the element could not be encoded to AMF. |
|||
|
ErrorAlias Adapts Python exception objects to Adobe Flash Player error objects. |
|||
|
MixedArray Used to be able to specify the mixedarray type.
|
|||
|
ReferenceError Raised if an AMF data stream refers to a non-existent object or string reference (in the case of AMF3). |
|||
|
TypedObject This class is used when a strongly typed object is decoded but there is no registered class to apply it to. |
|||
|
TypedObjectClassAlias The meta class for TypedObject used to adapt PyAMF. |
|||
|
UndefinedType Represents the undefined value in the Adobe Flash
Player client.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
classobj
|
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
ALIAS_TYPES =
|
|||
AMF0 = 0
|
|||
AMF3 = 3
|
|||
CLASS_CACHE =
|
|||
CLASS_LOADERS = set()
|
|||
DEFAULT_ENCODING = 3
|
|||
ENCODING_TYPES =
|
|||
ERROR_CLASS_MAP =
|
|||
TYPE_MAP = {}
|
|||
Undefined = pyamf.Undefined
|
|||
__package__ =
|
|||
version = (0, 6, 1)
|
|||
Imports: util, ClassAlias, UnknownClassAlias, _version, adapters, alias, inspect, python, register_adapters, types, versions
|
|||
Maps an exception class to a string code. Used to map remoting
An example:
>>> class AuthenticationError(Exception):
... pass
...
>>> pyamf.add_error_class(AuthenticationError, 'Auth.Failed')
>>> print pyamf.ERROR_CLASS_MAP
{'TypeError': <type 'exceptions.TypeError'>, 'IndexError': <type 'exceptions.IndexError'>,
'Auth.Failed': <class '__main__.AuthenticationError'>, 'KeyError': <type 'exceptions.KeyError'>,
'NameError': <type 'exceptions.NameError'>, 'LookupError': <type 'exceptions.LookupError'>}
See Also: remove_error_class |
Adds a custom type to TYPE_MAP. A custom type allows fine grain control of what to encode to an AMF data stream.
See Also: get_type and remove_type |
Loader for BlazeDS framework compatibility classes, specifically
implementing See Also: BlazeDS Since: 0.5 |
A generator function to decode a datastream.
|
A helper function to encode an element.
|
Loader for Flex framework compatibility classes.
|
Finds the ClassAlias that is registered to
If a string is supplied and no related ClassAlias is found, the alias is loaded via load_class.
|
Returns a codec.Decoder capable of decoding
AMF[
|
Returns a codec.Encoder capable of encoding
AMF[
|
Gets the declaration for the corresponding custom type.
See Also: add_type and remove_type |
Finds the class registered to the alias. The search is done in order:
|
This function allows you to map subclasses of ClassAlias to
classes listed in When an object is read/written from/to the AMF stream, a paired ClassAlias instance is created (or reused), based on the Python class of that object. ClassAlias provides important metadata for the class and can also control how the equivalent Python object is created, how the attributes are applied etc. Use this function if you need to do something non-standard.
Since: 0.4 See Also:
|
Registers a class to be used in the data streaming. This is the
equivalent to the
See Also: unregister_class |
Registers a loader that is called to provide the The An example:
def lazy_load_from_my_module(alias):
if not alias.startswith('foo.bar.'):
return None
from foo import bar
if alias == 'foo.bar.Spam':
return bar.Spam
elif alias == 'foo.bar.Eggs':
return bar.Eggs
pyamf.register_class_loader(lazy_load_from_my_module)
See Also: unregister_class_loader |
This is a helper function that takes the concept of Actionscript
packages and registers all the classes in the supplied Python module
under that package. It auto-aliased all classes in
Since: 0.5 |
Removes a class from the ERROR_CLASS_MAP. An example: >>> class AuthenticationError(Exception): ... pass ... >>> pyamf.add_error_class(AuthenticationError, 'Auth.Failed') >>> pyamf.remove_error_class(AuthenticationError) See Also: add_error_class |
Removes the custom type declaration.
|
Sets the default interface that will called apon to both de/serialise
XML entities. This means providing both For testing purposes, will return the previous value for this (if any). |
Removes the klass from the ALIAS_TYPES register. See Also: register_alias_type |
Opposite of register_class.
|
Unregisters a class loader.
See Also: register_class_loader |
|
|||
ALIAS_TYPES
|
CLASS_CACHE
|
ERROR_CLASS_MAP
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Jul 18 11:43:56 2011 | http://epydoc.sourceforge.net |