All Projects → Bandwidth → python-bandwidth

Bandwidth / python-bandwidth

Licence: MIT license
Public API for interfacing with Bandwidth from Python

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to python-bandwidth

winnow
Deprecated
Stars: ✭ 89 (+456.25%)
Mutual labels:  deprecated
opensextant
Deprecated Module: See Xponents or OpenSextantToolbox as active code base.
Stars: ✭ 31 (+93.75%)
Mutual labels:  deprecated
Sphero-Win-SDK
🚫 DEPRECATED: Sphero SDK for Win 8.1+ using RFCOMM
Stars: ✭ 36 (+125%)
Mutual labels:  deprecated
navigation tags
Radiant Extension - navigation_tags
Stars: ✭ 20 (+25%)
Mutual labels:  deprecated
firefox-better-history
A Better History page inspired by Vivaldi ⛺
Stars: ✭ 43 (+168.75%)
Mutual labels:  deprecated
gulp-es6-transpiler
[DEPRECATED] Transpile ES2015 to ES5
Stars: ✭ 47 (+193.75%)
Mutual labels:  deprecated
microsoft-teams-faqplusplus-app
DEPRECATED - This repository contains a deprecated version of the FAQ Plus app template. Please see the README file for more details and a link to the new repository
Stars: ✭ 47 (+193.75%)
Mutual labels:  deprecated
eeglab plugin aar
AAR plug-in for EEGLAB
Stars: ✭ 18 (+12.5%)
Mutual labels:  deprecated
evil-and-not-wholly-awesome-firefox
[deprecated since Mozilla turned evil] A list of resources for and about Mozilla Firefox
Stars: ✭ 29 (+81.25%)
Mutual labels:  deprecated
dcos-windows
Microsoft Windows support to DCOS
Stars: ✭ 12 (-25%)
Mutual labels:  deprecated
kcl-akka-stream
Custom Akka Stream Sources and Flows to interact with Kinesis streams using Kineis Client Library
Stars: ✭ 22 (+37.5%)
Mutual labels:  deprecated
contentstats
DEPRECATED – See how many entries have been created for channels and structures in your Craft CMS website.
Stars: ✭ 29 (+81.25%)
Mutual labels:  deprecated
nest-desktop-legacy
A web-based GUI application for NEST simulator (legacy, moved to nest-desktop/nest-desktop)
Stars: ✭ 18 (+12.5%)
Mutual labels:  deprecated
jQueryFileUpload.Net
[Out of Date] .Net handler for http://aquantum-demo.appspot.com/file-upload
Stars: ✭ 68 (+325%)
Mutual labels:  deprecated
otc-tools
(Deprecated) Simple bash/curl/jq based command line tool using the OpenStack and OTC specific REST APIs.
Stars: ✭ 27 (+68.75%)
Mutual labels:  deprecated
codgic-web-legacy
🐛 A free, open-source Online Judge alternative. Coding Magic.
Stars: ✭ 13 (-18.75%)
Mutual labels:  deprecated
octopush
[DEPRECATED] Open Source Octopush project
Stars: ✭ 22 (+37.5%)
Mutual labels:  deprecated
marquez-web
Marquez Web UI
Stars: ✭ 23 (+43.75%)
Mutual labels:  deprecated
TiTsEd
A save editor for Trials in Tainted Space.
Stars: ✭ 86 (+437.5%)
Mutual labels:  deprecated
api-blueprint-ast
API Blueprint AST Serialization Media Types [adhd, apib]
Stars: ✭ 30 (+87.5%)
Mutual labels:  deprecated

Bandwidth Python API

Deprecation Notice

This project is deprecated. Please go to https://github.com/Bandwidth/python-sdk

Build Status Can I Use Python 3?Documentation Status

Client library for the Bandwidth App Platform

Full Reference

dev.bandwidth.com/python-bandwidth

Requirements

Installation

pip install bandwidth-sdk

Usage

Client Initialization

import bandwidth
voice_api = bandwidth.client('voice', 'u-user', 't-token', 's-secret')
messaging_api = bandwidth.client('messaging', 'u-user', 't-token', 's-secret')
account_api = bandwidth.client('account', 'u-user', 't-token', 's-secret')

## Or import each individually for better IDE integration::

from bandwidth import messaging, voice, account
messaging_api = messaging.Client('u-user', 't-token', 's-secret')
voice_api = voice.Client('u-user', 't-token', 's-secret')
account_api = account.Client('u-user', 't-token', 's-secret')

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

Search and order phone number

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

my_number = account_api.order_phone_number(numbers[0]['number'])

print(my_number)
#n-rnd5eag33safchqmrj3q

Send Text Message

message_id = api.send_message(from_ = '+1234567980',
                              to = '+1234567981',
                              text = 'SMS message')
print(message_id)
# m-messageId

Send Picture Message

message_id = api.send_message(from_ = '+1234567980',
                              to = '+1234567981',
                              text = 'MMS message',
                              media=['http://cat.com/cat.png'])
print(message_id)
# m-messageId

Fetch information about single message

my_message = api.get_message('m-messageId')
print(my_message[state])
## received

Create an outbound call

call_id = api.create_call(from_ = '+1234567890',
                          to = '+1234567891',
                          callback_url = "http://yoursite.com/calls")
print(call_id)
## c-abc123

Get information on single call

my_call = api.get_call('c-abc123')
print(my_call)
## {   'callback_url'         : 'http://yoursite.com/calls',
##     'direction'           : 'out',
##     'events'              : 'https://api.catapult.inetwork.com/v1/users/u-abc/calls/c-abc123/events',
##     'from'                : '+1234567890',
##     'id'                  : 'c-abc123',
##     'recording_enabled'    : False,
##     'recording_file_format' : 'wav',
##     'recordings'          : 'https://api.catapult.inetwork.com/v1/users/u-abc/calls/c-abc123/recordings',
##     'startTime'           : '2017-01-26T16:10:11Z',
##     'state'               : 'started',
##     'to'                  : '+1234567891',
##     'transcription_enabled': False,
##     'transcriptions'      : 'https://api.catapult.inetwork.com/v1/users/u-abc/calls/c-abc123/transcriptions'}

Retrieving list of calls

call_list = api.list_calls(to = '+19192223333', size = 2)
print(list(call_list))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].