Caller object

class terminusgps.twilio.caller.TwilioCaller[source]

An asyncronous phone messager/caller.

create_notification(to_number, message[, method="sms"]) asyncio.Task[source]

Creates a task that must be awaited in an asyncronous event loop in order to be executed.

Parameters:
  • to_number (str) – A phone number, starting with a ‘+’ and country code.

  • message (str) – A message to send to to_number.

  • method (str) – Notification method to use. Default is "sms".

Returns:

An awaitable notification task.

Return type:

asyncio.Task

create_call(to_number, message) None[source]

Creates a phone call task.

Parameters:
  • to_number (str) – A phone number, starting with a ‘+’ and country code.

  • message (str) – A message to send to to_number.

Returns:

Nothing.

Return type:

None

create_sms(to_number, message) None[source]

Creates an sms message task.

Parameters:
  • to_number (str) – A phone number, starting with a ‘+’ and country code.

  • message (str) – A message to send to to_number.

Returns:

Nothing.

Return type:

None