Skip to main content

a oursms Library in python

Project description

oursms py:

a oursms Library in python

Installation:

Get the project useing pip

pip3 install oursms_py

Usage/Examples:

First you must import the lib

from oursms_py import *

then you create a client with your api credentials

client = Client(<USER-ID>, <API-KEY>)

Then you can send messages as follows

Normal Message:

msg=client.send_msg(<MOBILE-NUMBER, <MESSAGE-TEXT>)
if type(msg)==nan:
  print("cant send")

#store message id to check status later if you want

OTP Message:

Here you send the otp as an integer and the api takes care of appending it to a message body

msg=client.send_otp(<MOBILE-NUMBER, <OTP_NUMBER>)
if type(msg)==nan:
  print("cant send")

Message Status:

messageStatus = client.msg_status(<MESSAGE-ID>)
#This json List typically contains only one element

Project details


Release history Release notifications | RSS feed

This version

0.9

Download files

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

Source Distribution

oursms_py-0.9.tar.gz (14.6 kB view hashes)

Uploaded Source

Supported by

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