yowsup_celery package¶
Submodules¶
yowsup_celery.celery module¶
yowsup_celery.exceptions module¶
-
exception
yowsup_celery.exceptions.
AuthenticationError
[source]¶ Bases:
yowsup_celery.exceptions.YowsupCeleryError
Raised when YowsupStack cannot authenticate with the whatsapp. This means the password for number is incorrect. Check if registration was correct
-
exception
yowsup_celery.exceptions.
ConfigurationError
[source]¶ Bases:
yowsup_celery.exceptions.YowsupCeleryError
Raised when YowsupStack detects and error in configurations
-
exception
yowsup_celery.exceptions.
ConnectionError
[source]¶ Bases:
yowsup_celery.exceptions.YowsupCeleryError
Raised when CeleryLayer tries to perform an action which requires to be connected to WhatsApp
-
exception
yowsup_celery.exceptions.
UnexpectedError
[source]¶ Bases:
yowsup_celery.exceptions.YowsupCeleryError
Raised for unknown or unexpected errors.
yowsup_celery.layer module¶
-
class
yowsup_celery.layer.
CeleryLayer
[source]¶ Bases:
yowsup.layers.interface.interface.YowInterfaceLayer
Layer to be on the top of the Yowsup Stack. :ivar bool connected: connected or not connected to whatsapp :ivar YowLayerInterface interface: layer interface
-
on_ack
(*args, **kwargs)[source]¶ Callback function when receiving an ack for a sent message from whatsapp
-
on_failure
(entity)[source]¶ Callback function when there is a failure in a connection to whatsapp server
-
on_request_upload_result
(jid, path, result_request_upload_iq_protocol_entity, request_upload_iq_protocol_entity, caption=None)[source]¶
-
on_success
(success_protocol_entity)[source]¶ Callback when there is a successful connection to whatsapp server
-
send_audio
(*args, **kwargs)[source]¶ Send audio message :param str number: phone number with cc (country code) :param str path: audio file path
-
send_image
(*args, **kwargs)[source]¶ Send image message :param str number: phone number with cc (country code) :param str path: image file path
-
send_location
(*args, **kwargs)[source]¶ Send location message :param str number: phone number with cc (country code) :param str name: indentifier for the location :param str url: location url :param str longitude: location longitude :param str latitude: location latitude
-
yowsup_celery.layer_interface module¶
yowsup_celery.stack module¶
-
class
yowsup_celery.stack.
YowsupStack
(credentials, encryption=False, top_layers=None)[source]¶ Bases:
yowsup.stacks.yowstack.YowStack
Gateway for Yowsup in a client API way
Variables: - listening (bool) – asyncore loop task in execution
- detached_queue (Queue) – Queue with callbacks to execute after
:ivar YowLayerInterface facade:layer interface on top of stack disconnection
-
asynloop
(auto_connect=False, timeout=10, detached_delay=0.2)[source]¶ - Non-blocking event loop consuming messages until connection is lost,
- or shutdown is requested.
Parameters: - timeout (int) – number of secs for asyncore timeout
- detached_delay (float) – float secs to sleep when exiting asyncore loop and execution detached queue callbacks