Skip to main content

A Docker and AWS utility package

Project description

WITTY FLOW SMS PIP PACKAGE

Step 1: Install The Package Via Pip

Via Pip

  pip install witty_flow_sms

Step 2: Initialize

#IMPORT 
from witty_flow_sms import WittyFlowSms

APP_ID = XXXXXXXXXXXX
APP_SECRET = XXXXXXXX
client = WittyFlowSms(APP_ID, APP_SECRET)

Usage

Send Text Message

  // SEND SMS
  // sendMessage Takes 3 Params (phone, sender, message)
  // sender => string should not be more than 14 characters
  // phone => string should take the 0244XXXXXX format
  // message => string should not me more than 180 characters
  res = client.send_sms('0507565349', 'Possitech', 'Test Message')

  // OnSuccess Response
  {
    "status": "success",
    "code": 2020,
    "message": "Accpeted for delivery",
    "data": {
        "status": "accepted",
        "message_id": "ebb04f7f-147f-4d17-877b-8dd8af4ed2fe",
        "message": "New message",
        "date_created": "2020-08-24T00:17:09.000000Z",
        "direction": "MT",
        "from": "Ghana",
        "to": "233541348180",
        "type": "plain",
        "message_segments": 1,
        "cost": "0.03",
        "service_rate": "0.030000",
        "callback_url": null
    }
}

Send Flash Message

  // SEND SMS
  // sendMessage Takes 3 Params (phone, sender, message)
  // sender => string should not be more than 14 characters
  // phone => string should take the 0244XXXXXX format
  // message => string should not me more than 180 characters
  res = client.send_sms('0507565349', 'Possitech', 'Test Message')

  // OnSuccess Response
  {
    "status": "success",
    "code": 2020,
    "message": "Accpeted for delivery",
    "data": {
        "status": "accepted",
        "message_id": "ebb04f7f-147f-4d17-877b-8dd8af4ed2fe",
        "message": "New message",
        "date_created": "2020-08-24T00:17:09.000000Z",
        "direction": "MT",
        "from": "Ghana",
        "to": "233541348180",
        "type": "plain",
        "message_segments": 0,
        "cost": "0.03",
        "service_rate": "0.030000",
        "callback_url": null
    }
}

Get Sms Status

  // Get Sms Status
  // getSmsStatus Takes 1 Param (message_id)
  // message_id => string
  res = client.check_sms_status('21776c6f-3c84-40c0-b0a5-14c3b0c6f514')

  // OnSuccess Response
  {
    "status": "success",
    "code": 2000,
    "message": "Message retrieved",
    "data": {
        "message_id": "21776c6f-3c84-40c0-b0a5-14c3b0c6f514",
        "status": "delivered",
        "message": "New message",
        "date": "2020-08-23T23:54:04.000000Z",
        "readable_date": "Sun August 23, 2020 11:54:04 PM",
        "direction": "MT",
        "type": "1",
        "sender": "Ghana",
        "recipient": "233541348180",
        "message_segments": 1,
        "cost": "0.03",
        "rate": "0.030000",
        "billing": "charged"
    }
}

Get Account Balance

  res = client.get_account_balance()
  // OnSuccess Response
  {
    "status": "success",
    "code": 2000,
    "message": "Balance Retrieved",
    "data": {
        "balance": "19.19",
        "currency": "GHS"
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

witty_flow_sms-1.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file witty_flow_sms-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: witty_flow_sms-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.1

File hashes

Hashes for witty_flow_sms-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc58de61b66fec7f70d2ae3b9a29f9d5a39a9f77a58b2d8b9867f779170ed1f6
MD5 1475af7aa5bde44ede4e7af870f401ab
BLAKE2b-256 c32967cb4c6898c9c5369b032b2062853263d9ef7f0b7d9c09bed19021bec24a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page