Skip to main content

Bandwidth API for v2 messaging

Project description

Bandwidth Python API

Client library for the Bandwidth App Platform

Full Reference

dev.bandwidth.com/python-bandwidth

Requirements

Installation

pip install pybandwidth_v2

Usage

Client Initialization

from pybandwidth_v2.bandwidth_client import BandwidthAccountAPI, BandwidthMessagingAPI
messaging_api = BandwidthMessagingAPI('acc-account_id', 't-token', 's-secret', 'a-application_id')
account_api = BandwidthAccountAPI('acc-account_id', 'u-username', 'p-password')

Each of these code sample assumes that you have already initialized a client

Search phone number

numbers = account_api.search_available_numbers(area_code = '910', quantity = 3)
print(numbers[0]['number'])
## +19104440230

Send Text Message

message_id = messaging_api.send_message('+1234567980',
                              ['+1234567981'],
                              'SMS message')
print(message_id)
# m-messageId

Release History

0.0.2 (2019-09-12)

Initial release of SDK

Developer Info

Running tests

pip3 install nose

nosetests pybandwidth_v2

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

pybandwidth_v2-0.0.2.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

pybandwidth_v2-0.0.2-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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