Skip to main content

SMS framework: Africa's Talking provider

Project description

SMSframework AfricasTalking Provider

Africa's Talking Provider for smsframework

Initialization

from smsframework import Gateway
from smsframework_africastalking import AfricasTalkingProvider

gateway = Gateway()
gateway.add_provider('africas_talking', AfricasTalkingProvider,
    username='sandbox',
    api_key='\*\*\*'
)

Config

  • username: str: Username for your Africa's Talking account, use sandbox for development Required
  • api_key: str: API key for your Africa's Talking account Required

Sending Parameters

Provider-specific sending params:

  • target_country: str: 2-digit ISO code of the country the phonenumber should be interpretted as from Required

Example:

from smsframework import OutgoingMessage

message = OutgoingMessage('+254789789789', 'Hello Kenya').params(target_country='KE')

gateway.send(message)

Additional Information

AfricasTalking SMS API also supports sending premium messages and receiving incoming messages. These features are not currently implemented in this provider.

Project details


Download files

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

Source Distribution

smsframework-africastalking-1.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

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