Skip to content

Kavenegar migration to Ghasedak API Client Writen In Python

Notifications You must be signed in to change notification settings

ghasedakapi/ghasedak-kavenegar-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghasedak-kavenegar-python

If you need to future information about API document Please visit RESTful Document

Installation

You can install our SDK from pypi through below command

pip install ghasedakkavenegar

You can download the Python SDK Here too

Then ,You need to make an account on Ghasedak from Here

After that you just need to pick API-KEY up from your panel.

Anyway there is good tutorial about Pull request

Usage

Send

from ghasedakkavenegar import *
try:
    api = KavenegarAPI('Your APIKey', timeout=20)
    params = {
        'sender': '',#optional
        'receptor': '',#multiple mobile number, split by comma
        'message': '',
    } 
    response = api.sms_send(params)
    print(response)
except APIException as e: 
    print(e)
except HTTPException as e: 
    print(e)

OTP

#!/usr/bin/env python
from ghasedakkavenegar import *
try:
    api = KavenegarAPI('Your APIKey', timeout=20)
    params = {
        'receptor': '',
        'template': '',
        'token': '',
        'type': 'sms',#sms vs call
    }   
  response = api.verify_lookup(params)
  print(response)
except APIException as e: 
  print(e)
except HTTPException as e: 
  print(e)

Send Bulk

#!/usr/bin/env python
from ghasedakkavenegar import *
try:
    api = KavenegarAPI('Your APIKey', timeout=20)
    params = {
        'sender':'["",""]',#array of string as json 
        'receptor': '["",""]',#array of string as json 
        'message': '["",""]',#array of string as json 
    } 
    response = api.sms_sendarray(params)
    print(response)
except APIException as e: 
    print(e)
except HTTPException as e: 
    print(e)

Contribution

Bug fixes, docs, and enhancements welcome! Please let us know [email protected]

About

Kavenegar migration to Ghasedak API Client Writen In Python

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%