skip to navigation
skip to content

TorpedoSMS 0.1

Send SMS using PagueVeloz Services

Python library to send SMS using PagueVeloz Services

What’s Torpedo?

Torpedo is an outdated name and was used to describe SMS in Brazil.

Requiremenrs

  • Python 2.7-3.4
  • Requests

Usage

from datetime import datetime, timedelta
from torpedo import Sms

sms = Sms('youemail@example.com', '9cd252fe-7f72-433d-bab1-b8e0c855e322')

# Get your balance.
print(sms.get_balance())

# Get all messages sent.
print(sms.get_messages())

# Get a range of messanges sent.
print(sms.get_messages(status=Sms.SENT, from_date=datetime(2015, 4, 24), to_date=datetime(2015, 4, 24)))

# Get message status using PagueVeloz id.
print(sms.get_message_status(202473))

# Get message status using PagueVeloz id.
print(sms.get_message_status(id=290334))

# Get message status using seu id.
print(sms.get_message_status(seu_id='123'))

# Get message details using PagueVeloz id.
print(sms.get_message_details(202473))

# Get message details using PagueVeloz id.
print(sms.get_message_details(id=290334))

# Get message details using seu id.
print(sms.get_message_details(seu_id='123'))

# Send a message.
tomorrow = datetime.today() + timedelta(days=1)
print(sms.send_message(content='This is a test.', to_number='554799887766', from_number='554788776655', seu_id='123', schedule=tomorrow))

For a complete help type help(torpedo.Sms).

Get an access token

Go to PagueVeloz and create an account.

Restrictions

  • Only Brazilian mobile numbers are accepted. The number must be Country Code (55) + Area Code (2 digits) + Mobile Number (8-9 digits). e.g: 551196653434.
  • SMS length is 150 chars.
  • Avoid accentuation.
  • You can send to almost all know mobile provides (Vivo, Claro, Tim, Oi, and so on).
 
File Type Py Version Uploaded on Size
TorpedoSMS-0.1-py2.7.egg (md5) Python Egg 2.7 2015-04-25 6KB
TorpedoSMS-0.1-py3.4.egg (md5) Python Egg 3.4 2015-04-25 7KB
TorpedoSMS-0.1.linux-x86_64.tar.gz (md5) Source 2015-04-25 5KB
TorpedoSMS-0.1.tar.gz (md5) Source 2015-04-25 3KB