__init__.py¶
This module contains bindings to AMQP.
API¶
-
ltp._instanceof(instance, cls)[source]¶ Check type of instance by matching
.__name__with cls.__name__.
-
ltp.reactToAMQPMessage(message, send_back)[source]¶ React to given (AMQP) message. message is expected to be
collections.namedtuple()structure fromstructuresfilled with all necessary data.Parameters: - message (object) – One of the request objects defined in
structures. - send_back (fn reference) – Reference to function for responding. This is useful for progress monitoring for example. Function takes one parameter, which may be response structure/namedtuple, or string or whatever would be normally returned.
Returns: Response class from
structures.Return type: Raises: ValueError– if bad type of message structure is given.- message (object) – One of the request objects defined in