Skip to content

Shopyangu-engineering/shopyangu_comms-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shopyangu_communications-python

The SDK provides convenient access to the Shopyangu Communications APIs to python apps.

Documentation

Take a look at the API docs here.

Install

$ pip install git+https://github.com/Shopyangu-engineering/shopyangu_comms-python.git#egg=shopyangu_comms

Support

  • Python 2.7 >

Usage

The package needs to be configured with your API key, which you can get from the dashboard.

# import package
import shopyangu_comms

# Initialize SDK
api_key = "YOUR_API_KEY"
shopyangu_comms.initialize(api_key)


# Initialize a service e.g. SMS
sms = shopyangu_comms.SMS

# Use the service synchronously
response = sms.send("Hello Message!", "+2547xxxxxx")
print(response)

See example for more usage examples.

Initialization

Initialize the SDK by calling shopyangu_comms.initialize(api_key). After initialization, you can get instances of offered services as follows:

  • SMS: shopyangu_comms.SMS

Sms

  • send(message: str, recipient: str, sender_id: str = None): Send a message.

    • message: SMS content. REQUIRED
    • recipient: The phone number receiving the message. REQUIRED
    • sender_id: Shortcode or alphanumeric ID that is registered with your Shopyangu account.

Issues

If you find a bug, please file an issue on our issue tracker on GitHub.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages